ProgrammingModerate

int a[2][3]; with two rows and three columns in a variable-length array, what is sizeof(a) on a platform with 4-byte int?

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

Correct answer: C. 24

The array holds 6 ints of 4 bytes each, which is 24 bytes. sizeof is evaluated at run time for a VLA.

More C Programming questions

Exams that ask this topic