ProgrammingVery hard

int n = 0; while (++n < 10 && n % 4); printf("%d", n); What is printed?

  1. A. 3
  2. B. 5
  3. C. 4
  4. D. 10

Correct answer: C. 4

The loop stops as soon as n reaches 4, because the test n % 4 is then zero and the while condition fails.

More C Programming questions

Exams that ask this topic