ProgrammingHard

int m[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; How many monotone paths (moves right or down) are there from m[0][0] to m[2][2]?

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

Correct answer: C. 6

Each path is a choice of which 2 of the 4 moves are downwards, so C(4,2) = 6.

More C Programming questions

Exams that ask this topic