C program to transpose a matrix

Output: