ProgrammingVery hard

The sum of the elements of a[i][j] = i * j over the 4 x 4 matrix equals what?

  1. A. 30
  2. B. 36
  3. C. 40
  4. D. 16

Correct answer: B. 36

The sum is (0 + 1 + 2 + 3) x (0 + 1 + 2 + 3) = 6 x 6 = 36, since the double sum factors.

More C Programming questions

Exams that ask this topic