ProgrammingVery hard

int m[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; int t = 0; for (int i = 0; i < 3; i++) t += m[i][i] * m[i][2 - i]; printf("%d", t); What is printed?

  1. A. 25
  2. B. 15
  3. C. 91
  4. D. 30

Correct answer: C. 91

The products are 1 x 3, 5 x 5 and 9 x 7, so the total is 3 + 25 + 63 = 91.

More C Programming questions

Exams that ask this topic