GATE Computer ScienceHardGATE CSE

int a[3][4] holds a[i][j] = 4*i + j (row-major, sizeof(int) = 4). What does printf("%d %d", *(a[2] - 3), **(a + 1) + *(*a + 5)); print?

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

Correct answer: C. 5 9

a[2] − 3 points to a[1][1] = 5. **(a+1) = a[1][0] = 4 and *(*a + 5) = a[1][1] = 5, sum 9.

More Programming and Data Structures (GATE) questions

Exams that ask this topic