Question: 1. Write a C program to multiply matrix A and matrix B of variable. For both A and B, the size of the matrix will

 1. Write a C program to multiply matrix A and matrix

1. Write a C program to multiply matrix A and matrix B of variable. For both A and B, the size of the matrix will be given along with the entries of the matrix in two input files, inA.txt and inB.txt. The first line of the input file will contain the number of rows followed by the number of columns of the matrix. The entries of the matrix are listed on the next line in row-major order. Print the output matrix C to outC.txt in the same format as input files. Be sure to include comments in your code. Example: If the matrix A is 12 31 4 5 16 7 then the text file A.txt would be: 32 2 3 4 5 6 7 Note - some combinations of matrices can not be multiplied, your code should output an error in that case and set a error return code from main. Run your program on the following pair of matrices and include the printed output for the rotated C matrix and any errors: 4/18 1 8 8 3 -1 2 9 3 91 12 8 -31 1. Write a C program to multiply matrix A and matrix B of variable. For both A and B, the size of the matrix will be given along with the entries of the matrix in two input files, inA.txt and inB.txt. The first line of the input file will contain the number of rows followed by the number of columns of the matrix. The entries of the matrix are listed on the next line in row-major order. Print the output matrix C to outC.txt in the same format as input files. Be sure to include comments in your code. Example: If the matrix A is 12 31 4 5 16 7 then the text file A.txt would be: 32 2 3 4 5 6 7 Note - some combinations of matrices can not be multiplied, your code should output an error in that case and set a error return code from main. Run your program on the following pair of matrices and include the printed output for the rotated C matrix and any errors: 4/18 1 8 8 3 -1 2 9 3 91 12 8 -31

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!