ProgrammingModerate

int a[2][2] = {1, 2, 3, 4}; What is a[1][0]?

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

Correct answer: C. 3

A brace list without inner braces fills the array in row-major order: the first row gets 1, 2 and the second row gets 3, 4.

More C Programming questions

Exams that ask this topic