Please find the required program below with output: #include void transposeMatrix(int arr[][5], int trans[][4]){ for (int j = 0; j < 5; ++j) { for (int i = 0; i < 4; ++i) { trans[j][i] = arr[i][j]; // just reversing the address i,j to j,i so that the transpose will be made } } } void main() { int array[4][5], trans[5][4]; int i, j; printf(\"Enter the elements of matrix\ \"); for (i = 0; i < 4; ++i) { for (j = 0; j < 5; ++j) { scanf(\"%d\", &array[i][j]); // reading the 4x5 matrix array } } printf(\"The matrix is \ \"); //just printing the user input array for (i = 0; i < 4; ++i) { for (j = 0; j < 5; ++j) { printf(\" %d\", array[i][j]); } printf(\"\ \"); } transposeMatrix(array,trans); //calling the transposeMatrix method, so that the transpose of the matrix array will be stored in trans printf(\"Transpose of matrix is \ \"); //just printing the returned transpose matrix trans for (i = 0; i < 5; ++i) { for (j = 0; j < 4; ++j) { printf(\" %d\", trans[i][j]); } printf(\"\ \"); } } --------------------------------------------------------------------------------- OUTPUT: Enter the elements of matrix 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 The matrix is 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Transpose of matrix is 1 6 11 16 2 7 12 17 3 8 13 18 4 9 14 19 5 10 15 20 Solution Please find the required program below with output: #include void transposeMatrix(int arr[][5], int trans[][4]){ for (int j = 0; j < 5; ++j) { for (int i = 0; i < 4; ++i) { trans[j][i] = arr[i][j]; // just reversing the address i,j to j,i so that the transpose will be made } } } void main() { int array[4][5], trans[5][4]; int i, j; printf(\"Enter the elements of matrix\ \"); for (i = 0; i < 4; ++i) { for (j = 0; j < 5; ++j) { scanf(\"%d\", &array[i][j]); // reading the 4x5 matrix array } } printf(\"The matrix is \ \"); //just printing the user input array for (i = 0; i < 4; ++i) { for (j = 0; j < 5; ++j) { printf(\" %d\", array[i][j]); } printf(\"\ \"); } transposeMatrix(array,trans); //calling the transposeMatrix method, so that the transpose of the matrix array will be stored in trans printf(\"Transpose of matrix is \ \"); //just printing the returned transpose matrix trans for (i = 0; i < 5; ++i) { for (j = 0; j < 4; ++j) { printf(\" %d\", trans[i][j]); } printf(\"\ \"); } } --------------------------------------------------------------------------------- OUTPUT: Enter the elements of matrix 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 The matrix is 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Transpose of matrix is 1 6 11 16 2 7 12 17 3 8 13 18 4 9 14 19 5 10 15 20.