ProgrammingHard

For the array int a[2][3] = {{1, 2, 3}, {4, 5, 6}}, what does *(*(a + 1) + 2) print?

  1. A. 5
  2. B. 3
  3. C. 6
  4. D. 4

Correct answer: C. 6

a + 1 points at the second row, *(a + 1) is that row's address, and adding 2 reaches the third element, which is 6.

More C Programming questions

Exams that ask this topic