Question: Write a C program which fills a matrix of size NxM with random integers between 0and 100 and sorts the matrix in descending order. N
Write a C program which fills a matrix of size NxM with random integers between 0and 100 and sorts the matrix in descending order. N and M are the numbers of rows and columns
entered by the user. The maximum number of rows and columns can be 100.Your program should implement the following functions:
void fillMatrix(int A[][],int N, int M): To generates NxM random numbers between 1 and 100 and stores them in array A.
int sortMatrix(int A[][],int rowsize, int colsize): To sort the input array
void displayMatrix(int A[][],int N, int M): To display the array elements
(N rows and M columns).
Sample Interaction:
Enter number of rows: 100
! Enter number of rows: 3
Enter number of columns: 3
Before Sorting:
182 456 379
After Sorting:
987 654 321
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
