ProgrammingModerate

int a[3][3]; printf("%zu", sizeof a[0][0] * 3 * 3); What is printed with 4-byte int?

  1. A. 9
  2. B. 12
  3. C. 36
  4. D. 4

Correct answer: C. 36

sizeof binds only to its operand a[0][0], one int of 4 bytes, so the expression is 4 * 3 * 3 = 36. 9 counts elements instead of bytes, and 12 is the size of one row.

More C Programming questions

Exams that ask this topic