Question: 4. (20 pts) Write a function that computes two sums from the elements of an array of integers. Each element of the array contributes to

4. (20 pts) Write a function that computes two sums from the elements of an array of integers. Each element of the array contributes to one of the two sums, depending on whether the element itself is even or odd. Turn in your code and input/result together. Your function definition should look like: void sum (int all, int n, int even_elt_sum_ptr, int *odd_elt_sum_ptr)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
