Skip to the content.
Home Notes Create Task Data Structures Project Exam Preperation Quiz Corrections

Final Score 23/25

image

Quiz Corrections

Question 3

image

I selected the two wrong choices. The answer is both B and D because since y is initially negative, the loop condition count ≥ y is initially true, so the body of the loop is never executed and 0 is returned.

Question 15

image

The answer is C and not D because the programs each display ten values, but each value displayed by program B is one greater than the corresponding value from program A. Program A displays 1 2 3 4 5 6 7 8 9 10 and program B displays 2 3 4 5 6 7 8 9 10 11.