Question 128

What is the output? int i = 0;

What is the output? int i = 0; while (i < 5) { i++; if (i == 3) continue; printf("%d", i); }
  1. A1245
  2. B124
  3. C12345
  4. D012
Show answerHide answer

Correct answer: (A) 1245

Explanation

i becomes 1..5; 3 is skipped by continue.

From DSSSB TGT Computer Science Full Mock Test 2

This is question 128 of DSSSB TGT Computer Science Full Mock Test 2. 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.