ProgrammingVery hard

int a[5] = {[2] = 7, 9}; printf("%d", a[3]); What is printed?

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

Correct answer: D. 9

After the designator sets a[2] = 7, the next initialiser without a designator goes to the following element, a[3].

More C Programming questions

Exams that ask this topic