ProgrammingModerate

Matrix m = {{1,2,3},{4,5,6},{7,8,9}} is transposed in place. What is the first row afterwards?

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

Correct answer: A. 1 4 7

Transposing swaps m[i][j] with m[j][i]. The first row becomes the first column of the original, 1, 4, 7.

More C Programming questions

Exams that ask this topic