lOMoARcPSD|64026470
ECE2071 Computer Organisation and Programming
Mid Semester Test
Semester 1, 2017
First name: ______________ Family name: _____________
Student ID: ______________ Lab session: _______________
Instructions:
1. No electronic equipment allowed. Abacuses are ok.
2. Complete all 4 questions. Do not use red ink.
3. You have 50 minutes to complete this test.
4. This test is marked out of 40 marks and is worth 10% of your final unit grade.
5. Clearly indicate your final answer. Multiple answers to a single question will not be marked.
Total marks: / 40
messages.downloaded_by
, lOMoARcPSD|64026470
Questions 1 [10 marks]
Given the code above, what value of k is printed out onto the console given the following user
input?
User input Printed value of k
0
1
2
3
6
messages.downloaded_by
ECE2071 Computer Organisation and Programming
Mid Semester Test
Semester 1, 2017
First name: ______________ Family name: _____________
Student ID: ______________ Lab session: _______________
Instructions:
1. No electronic equipment allowed. Abacuses are ok.
2. Complete all 4 questions. Do not use red ink.
3. You have 50 minutes to complete this test.
4. This test is marked out of 40 marks and is worth 10% of your final unit grade.
5. Clearly indicate your final answer. Multiple answers to a single question will not be marked.
Total marks: / 40
messages.downloaded_by
, lOMoARcPSD|64026470
Questions 1 [10 marks]
Given the code above, what value of k is printed out onto the console given the following user
input?
User input Printed value of k
0
1
2
3
6
messages.downloaded_by