ProgrammingHardGATE CS

What is printed? Assume a 4-byte int.

What is printed? Assume a 4-byte int.
int m[3][4];
printf("%zu %zu %zu", sizeof(m[0]), sizeof(*m), sizeof m);
  1. A. 4 4 12
  2. B. 16 4 48
  3. C. 16 16 48
  4. D. 12 16 48

Correct answer: C. 16 16 48

m[0] and *m are both a row of 4 ints (16 bytes); the whole array is 3 rows, 48 bytes.

More C Programming questions

Exams that ask this topic