Problem: 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. ‘for loop’ for row iteration should be nested inside the ‘for loop’ for column iteration.

Output of Program

Transpose of Matrix in C

In this tutorial, we learned to transpose a matrix in c programming language. If you have any doubts or suggestions then please comment below.

Leave a Reply