Question: C PROGRAMMING C PROGRAMMING Problem P.3 A matrix (5 points) Write a program that creates a matrix of r rows and c columns and then
C PROGRAMMING
C PROGRAMMING

Problem P.3 A matrix (5 points) Write a program that creates a matrix of r rows and c columns and then initializes it with values that are read from a file. Then the matrix is printed to the screen. You will read the data from a file named matrix.dat, which contains the number of rows in the first line, the number of columns in the second line, then values are given for given rows and columns (see input structure and example below). Also implement a function to print the matrix where the prototype looks like this: void print_matrix (int **A, int rows, int cols) Input structure 4 3 1 1 3 2 2 5 The given input creates are 4 by 3 matrix and sets 1,1 to 3 and 2, 2 to 5. 09 3 0 0 0 5 0 0 0 0 0 0 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
