ProgrammingVery hard

On a platform with 4-byte int, int i = 5; printf("%zu %d", sizeof(i++), i); What is printed?

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

Correct answer: B. 4 5

sizeof does not evaluate its operand, so i stays 5. The size of an int on a typical platform is 4 bytes.

More C Programming questions

Exams that ask this topic