ProgrammingHard

static int next = 1; int f(void) { return next *= 2; } /* f is called three times; what does the third call return? */

  1. A. 8
  2. B. 4
  3. C. 6
  4. D. 2

Correct answer: A. 8

next goes 2, 4, 8 over the three calls, so the third call returns 8.

More C Programming questions

Exams that ask this topic