ProgrammingHard

int arr[3] = {1, 2, 3}; int (*pa)[3] = &arr; printf("%d", (*pa)[2]); What is printed?

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

Correct answer: C. 3

pa points to the whole array, *pa is the array, and [2] selects its third element, 3.

More C Programming questions

Exams that ask this topic