ProgrammingHard

Matrix m = {{1,2,3},{4,5,6},{7,8,9}} is rotated 90 degrees clockwise. What is the first row after rotation?

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

Correct answer: D. 7 4 1

A clockwise rotation makes the first row the first column read from bottom to top: 7, 4, 1.

More C Programming questions

Exams that ask this topic