ProgrammingModerate

int a[2][2] = {{1, 2}, {3, 4}}; int t = a[0][0]; a[0][0] = a[1][0]; a[1][0] = t; printf("%d", a[0][0]); What is printed?

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

Correct answer: C. 3

The swap moves a[1][0] into a[0][0], so the printed value is 3.

More C Programming questions

Exams that ask this topic