Question
Write a C program (not C++) that calls a function to multiply a matrix (two dimensional array). The main program should ask the user to
Write a C program (not C++) that calls a function to multiply a matrix (two dimensional array).
The main program should ask the user to enter an integer that will be used as the matrix adder and then call the function. The function should perform a matrix increment (every element of the array is incremented by the same value) and assign the result to another array. The function should be flexible enough to work with any array size and adder, communicated to the function from the main function.
After the function call, the main program should print the array with the initial values followed by the multiplied values as shown below.
Use as many variables and arrays as needed. When initializing the array, use the initial values shown in the output.
Provide restriction so that the original array passed to it cannot be modified by the function.
Expected input / output.
Enter adder: 2
Initial values
5 2 7
1 6 3
After adding by 2
7 4 9
3 8 5
Step 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