ProgrammingModerate

A tic-tac-toe board stored as char b[3][3] is full. What is the minimum number of moves that could have been made on it?

  1. A. 5, since only the winning side moves
  2. B. 0, since the board does not record moves
  3. C. 8, since the centre is never filled
  4. D. 9, since the board is full and every cell was played once

Correct answer: D. 9, since the board is full and every cell was played once

A full 3 x 3 board has 9 filled cells, and each move fills one cell. The minimum is therefore 9 moves.

More C Programming questions

Exams that ask this topic