Question 127

What is the output? for (int i = 0; i < 5; i++) {

What is the output? for (int i = 0; i < 5; i++) { if (i == 2) continue; if (i == 4) break; printf("%d", i); }
  1. A01234
  2. B0123
  3. C013
  4. D0134
Show answerHide answer

Correct answer: (C) 013

Explanation

i = 2 is skipped; the loop stops at i = 4.

From DSSSB TGT Computer Science Full Mock Test 5

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