Question: Write a C program to perform matrix multiplications. Your program gets N number of rows in square matrices being multiplied as a command-line argument. Then,
Write a C program to perform matrix multiplications. Your program gets N number of rows in square matrices being multiplied as a command-line argument. Then, it creates and initializes two square matrices (suppose, A and B), each of size (NxN). You can initialize your matrices to simple small integers such as 0-9. Next, your program creates third matrix to store the multiplication of A and B.
IMPOORTANT: Your program should also calculate the time required to perform the multiplication (excluding initialization phase). Once you have working program, you are required to write a shell script to run the program with different matrix sizes such that total number of elements in the matrix range from 4000-160000.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
