ProgrammingModerate

int a[2][3]; What is sizeof(a[1]) on a platform with 4-byte int?

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

Correct answer: D. 12

a[1] is one row of three ints, so its size is 3 x 4 = 12 bytes. sizeof(a) would be 24.

More C Programming questions

Exams that ask this topic