Question
(You must not use any array notions ([]) in this assignment) (MatrixMult.c) #include #include int** matMult(int **a, int **b, int size){ // (4) Implement your
(You must not use any array notions ([]) in this assignment)
(MatrixMult.c)
#include
#include
int** matMult(int **a, int **b, int size){
// (4) Implement your matrix multiplication here. You will need to
create a new matrix to store the product.
}
void printArray(int **arr, int n){
// (2) Implement your printArray function here
}
int main() {
int n = 0;
int **matA, **matB, **matC;
// (1) Define 2 n x n arrays (matrices).
// (3) Call printArray to print out the 2 arrays here.
//(5) Call matMult to multiply the 2 arrays here.
//(6) Call printArray to print out resulting array here.
return 0;
}
(Assignment 1, individual) Matrix multiplication Now we know how 2D arrays work. Let's put them in practical use (you must not use any array notions (I) in this assignment) 1. Open MatrixMult.c. and define in main() two n x n matrices (arrays) using malloc 2. Implement printArray function so you can call it to print a 2D array. 3. In main(), call printArray to print out the 2 arrays you have defined in 4. Implement matMult so it multiplies the 2 input arrays and return the resulting array. Pay attention to the input arguments and return type. 5. In main(), call matMult to multiply the 2 arrays you have defined in (1) 6. In main(), call printArray to print out the resulting array you receive in 7. You need to declare any variables that are necessaryStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started