ProgrammingVery hard

int a[3][4] = {0}; a[2][3] = 9; int *p = &a[0][0]; printf("%d", p[11]); What is printed?

  1. A. 0
  2. B. 9
  3. C. 11
  4. D. 12

Correct answer: B. 9

Index 11 is row 2 column 3 in a row-major array of four columns, which holds 9.

More C Programming questions

Exams that ask this topic