Question: PROGRAMMING LANGUAGE USED IS C (10 pts) write a C function matrixTranspose that takes a two-dimensional array as its input argument then transposes its elements.


PROGRAMMING LANGUAGE USED IS C
(10 pts) write a C function matrixTranspose that takes a two-dimensional array as its input argument then transposes its elements. Develop it in two steps: First, assume the matrix is a square matrix. This will make finding the transpose a simple swapping of the arrays' elements. a. Second, generalize your function to work with any NxM matrix where N#M. You will need to use pointer arithmetic instead inside the function and also properly handle memory allocation for this purpose. b. (10 pts) write a C function matrixTranspose that takes a two-dimensional array as its input argument then transposes its elements. Develop it in two steps: First, assume the matrix is a square matrix. This will make finding the transpose a simple swapping of the arrays' elements. a. Second, generalize your function to work with any NxM matrix where N#M. You will need to use pointer arithmetic instead inside the function and also properly handle memory allocation for this purpose. b
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
