Write a Program in C to output the transpose of a matrix.

Transpose of the matrix is converting the rows into columns and columns into the rows. Whether a matrix is a square or rectangle its transpose is possible.

C Program to find transpose of matrix

To find transpose of a matrix in C, we need to iterate through columns before iterating through row i.e i-for loop should be nested inside j-for loop.

Output of Program

Transpose of Matrix in C

If you know a better solution or didn’t understand any part of the code then do comment below.

Leave a Reply