In this exercise, you should calculate the sum of a given 2 dimensional integer array.
We have written the code about reading the size and the content of the array, and we want to pass them to a function to calculate the final answer. What you need is helping us to complete the function.
What input into the function is the pointer, the width and the length of the array, and the function has to return the sum of the whole array.
For more specific, you only need to implement the following function:
The .c and .h file below might be helpful if you wnat to know how the function and the whole program works.
For simplify the question, we garantee that the final answer can be represented as a integer.
The size and the content of a 2-D array.
The sum of the total array.