ProgrammingHard

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

  1. A. 0
  2. B. 1
  3. C. 2
  4. D. 7

Correct answer: D. 7

p points at the first element of row 1, so p[2] is a[1][2], which is set to 7.

More C Programming questions

Exams that ask this topic