Question 129

What is the output? int k = 10;

What is the output? int k = 10; do { k++; } while (k < 5); printf("%d", k);
  1. AInfinite loop
  2. B10
  3. C5
  4. D11
Show answerHide answer

Correct answer: (D) 11

Explanation

The do-while body runs once before the condition fails.

From DSSSB TGT Computer Science Full Mock Test 3

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