CompTIA
FC0-U61 · Question #382
Given the following pseudocode: Which of the following is the output of the code?
The correct answer is C. 10. It enters loop for the final time at 9. Which sets it to 10. It can't run the loop after that since 10 is not less than 10. So it returns 10.
Software Development
Question
Given the following pseudocode:
Which of the following is the output of the code?
Options
- A1
- B9
- C10
- D11
How the community answered
(34 responses)- A9% (3)
- B3% (1)
- C85% (29)
- D3% (1)
Explanation
It enters loop for the final time at 9. Which sets it to 10. It can't run the loop after that since 10 is not less than 10. So it returns 10.
Topics
#pseudocode#program output#code tracing
Community Discussion
No community discussion yet for this question.