ProgrammingModerate

int *p = (int[]){4, 5, 6}; printf("%d", p[2]); What is printed?

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

Correct answer: C. 6

The compound literal is an array of three ints, and p[2] is its third element.

More C Programming questions

Exams that ask this topic