What is the output? int i;
What is the output?
int i;
for (i = 0; i < 10; i += 3);
printf("%d", i);
Show answerHide answer
Correct answer: (D) 12
Explanation
The semicolon ends the loop; i goes 0, 3, 6, 9, 12 and the loop exits at 12.
Correct answer: (D) 12
Explanation
The semicolon ends the loop; i goes 0, 3, 6, 9, 12 and the loop exits at 12.
This is question 128 of DSSSB TGT Computer Science Full Mock Test 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.