ProgrammingHard

int m[2][2] = {{1, 2}, {3, 4}}; int *p = &m[0][0]; printf("%d", p[2] * p[1]); What is printed?

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

Correct answer: D. 6

p[2] is m[1][0], which is 3, and p[1] is m[0][1], which is 2. Their product is 6.

More C Programming questions

Exams that ask this topic