ProgrammingHard

The number of ways to choose a 2 x 2 submatrix in a 4 x 4 matrix (choosing consecutive rows and columns) is what?

  1. A. 9
  2. B. 16
  3. C. 4
  4. D. 12

Correct answer: A. 9

A 2 x 2 block is set by its top-left corner, which can be any of the 3 x 3 positions where it fits. So there are 9.

More C Programming questions

Exams that ask this topic