Home /
Expert Answers /
Computer Science /
please-do-it-in-c-programming-language-the-function-shown-below-is-designed-to-calculate-the-sum-and-pa460
(Solved): please do it in C programming language The function shown below is designed to calculate the sum and ...
please do it in C programming language
The function shown below is designed to calculate the sum and average of the values stored in the given array. Note that the function does not return a result, so the idea is to use pointers to change the original values of data_average and data_sum. Unfortunately, the function is missing pointer operators in key places. Your task is to provide the corrected code. void add_and_average(double a , int \( n \), double data_average, double data_sum) \{ int \( i \); data_sum \( =0.0 \) for \( (i=0 ; i