COS1511
EXAM PACK
FOR ASSISTANCE WITH THIS MODULE +27 67 171 1739
, lOMoARcPSD|53028991
UNIVERSITY EXAMINATIONS
OCTOBER/NOVEMBER 2025
COS1511
Introduction to programming I
Welcome to the COS1511 examination
Date:15 October 2025
Time: 07:45
Hours: 2hrs
Examiner name: Ms DR Mokwana
Internal moderator name: Mr SET Lehong
External moderator name: N/A
This paper consists of 09 pages.
Total marks: 70
Instructions:
• Upload your answer script in a single PDF file format not password protected
• No emailed scripts will be marked
• Preview your submission to ensure legibility and correct script file has been uploaded
• Students who have not utilised invigilation app will be subjected to disciplinary process
• Students suspected of dishonesty conduct during examination will be subjected to
disciplinary process
• Write neatly and legibly
• The mark for each question is in brackets next to the question
Additional student instructions
1. Incorrect file format and uncollated answer scripts will not be considered.
2. Incorrect answer scripts and/or submissions made on unofficial examinations platforms
(including the invigilator cell phone application) will not be marked and no opportunity will
be granted for resubmission. Only the last answer file uploaded within the stipulated
submission duration period will be marked.
3. Submissions will only be accepted from registered student accounts.
4. Students suspected of dishonest conduct during the examinations will be subjected to
disciplinary processes. Students may not communicate with any other person or request
assistance from any other person during their examinations. Plagiarism is a violation of
academic integrity and students who plagiarise, copy from published work or Artificial
Intelligence Software (eg ChatGPT) or online sources (eg course material), will be in
violation of the Policy on Academic Integrity and the Student Disciplinary Code and may be
referred to a disciplinary hearing. Unisa has a zero tolerance for plagiarism and/or any
other forms of academic dishonesty.
5. Listening to audio (music) and making use of audio-to-text software is strictly prohibited
during your examination session unless such usage of the software is related to a student’s
assistive device which has been so declared. Failure to do so will be a transgression of
Unisa’s examination rules and the student's marks will be withheld.
6. Non-adherence to the processes for uploading assessment responses will not qualify the
student for any special concessions or future assessments.
Downloaded by Edger Tutora ()
, lOMoARcPSD|53028991
COS1511 OCT/NOV 2025
QUESTION 1 [30]
1.1. based on the program below. This program contains one or more syntax errors.
Which of the options below will rectify the syntax error in line 7?
1. Change line 7 to sentence = 'Hi there, ';
2. Change line 7 to sentence1 = "Hi there, ";
3. Change line 8 to sentence1 = sentence1 + 'Mary!';
4. Change line 8 to sentence1 = sentence + "Mary!"; (3)
1.2. Suppose the following declarations appear in a C++ program:
float amount, forWaiter;
char service;
If the following function header is given:
float tip(float amountP, char serviceP)
which of the options below is a correct calling statement of the function tip?
1. forWaiter = tip(float amount, char service);
2. tip(amountP, serviceP);
3. forWaiter = tip(123.66, 'A');
4. forWaiter = tip(amountP, serviceP); (3)
2
Downloaded by Edger Tutora ()
, lOMoARcPSD|53028991
COS1511 OCT/NOV 2025
1.3. Suppose the following declarations appear in a C++ program:
float afford, amount;
int number;
string name;
If the following function header is given:
void supplyInfo(int nrP, string & nameP, float & amountP)
which of the options below is a correct calling statement of the function
supplyInfo?
1. supplyInfo(4, "Beach Hotel", 789);
2. supplyInfo(4, name, amount);
3. supplyInfo(nrP, nameP, amountP);
4. supplyInfo(number, "Beach Hotel", 789); (3)
1.4. Consider the following C++ code segment:
If the value of i is 5 and the value of j is 6, which of the options below gives the
correct output?
1. 2
2. 1
3. 4
4. 3
(3)
3
Downloaded by Edger Tutora ()
EXAM PACK
FOR ASSISTANCE WITH THIS MODULE +27 67 171 1739
, lOMoARcPSD|53028991
UNIVERSITY EXAMINATIONS
OCTOBER/NOVEMBER 2025
COS1511
Introduction to programming I
Welcome to the COS1511 examination
Date:15 October 2025
Time: 07:45
Hours: 2hrs
Examiner name: Ms DR Mokwana
Internal moderator name: Mr SET Lehong
External moderator name: N/A
This paper consists of 09 pages.
Total marks: 70
Instructions:
• Upload your answer script in a single PDF file format not password protected
• No emailed scripts will be marked
• Preview your submission to ensure legibility and correct script file has been uploaded
• Students who have not utilised invigilation app will be subjected to disciplinary process
• Students suspected of dishonesty conduct during examination will be subjected to
disciplinary process
• Write neatly and legibly
• The mark for each question is in brackets next to the question
Additional student instructions
1. Incorrect file format and uncollated answer scripts will not be considered.
2. Incorrect answer scripts and/or submissions made on unofficial examinations platforms
(including the invigilator cell phone application) will not be marked and no opportunity will
be granted for resubmission. Only the last answer file uploaded within the stipulated
submission duration period will be marked.
3. Submissions will only be accepted from registered student accounts.
4. Students suspected of dishonest conduct during the examinations will be subjected to
disciplinary processes. Students may not communicate with any other person or request
assistance from any other person during their examinations. Plagiarism is a violation of
academic integrity and students who plagiarise, copy from published work or Artificial
Intelligence Software (eg ChatGPT) or online sources (eg course material), will be in
violation of the Policy on Academic Integrity and the Student Disciplinary Code and may be
referred to a disciplinary hearing. Unisa has a zero tolerance for plagiarism and/or any
other forms of academic dishonesty.
5. Listening to audio (music) and making use of audio-to-text software is strictly prohibited
during your examination session unless such usage of the software is related to a student’s
assistive device which has been so declared. Failure to do so will be a transgression of
Unisa’s examination rules and the student's marks will be withheld.
6. Non-adherence to the processes for uploading assessment responses will not qualify the
student for any special concessions or future assessments.
Downloaded by Edger Tutora ()
, lOMoARcPSD|53028991
COS1511 OCT/NOV 2025
QUESTION 1 [30]
1.1. based on the program below. This program contains one or more syntax errors.
Which of the options below will rectify the syntax error in line 7?
1. Change line 7 to sentence = 'Hi there, ';
2. Change line 7 to sentence1 = "Hi there, ";
3. Change line 8 to sentence1 = sentence1 + 'Mary!';
4. Change line 8 to sentence1 = sentence + "Mary!"; (3)
1.2. Suppose the following declarations appear in a C++ program:
float amount, forWaiter;
char service;
If the following function header is given:
float tip(float amountP, char serviceP)
which of the options below is a correct calling statement of the function tip?
1. forWaiter = tip(float amount, char service);
2. tip(amountP, serviceP);
3. forWaiter = tip(123.66, 'A');
4. forWaiter = tip(amountP, serviceP); (3)
2
Downloaded by Edger Tutora ()
, lOMoARcPSD|53028991
COS1511 OCT/NOV 2025
1.3. Suppose the following declarations appear in a C++ program:
float afford, amount;
int number;
string name;
If the following function header is given:
void supplyInfo(int nrP, string & nameP, float & amountP)
which of the options below is a correct calling statement of the function
supplyInfo?
1. supplyInfo(4, "Beach Hotel", 789);
2. supplyInfo(4, name, amount);
3. supplyInfo(nrP, nameP, amountP);
4. supplyInfo(number, "Beach Hotel", 789); (3)
1.4. Consider the following C++ code segment:
If the value of i is 5 and the value of j is 6, which of the options below gives the
correct output?
1. 2
2. 1
3. 4
4. 3
(3)
3
Downloaded by Edger Tutora ()