C Program to Find the Transpose of a Matrix — Rectangular and In-Place Square
The transpose of a matrix is formed by flipping it over its main diagonal — rows become columns and columns become rows. If the original matrix is of order M×N, its transpose is of order N×M, where element A[i][j] becomes B[j][i]. Matrix A (3×2): Transpose B (2×3): 1 2 1 3 5 3 4 → …