Question: What best describes what the following function does? double yyy ( int vals[], int z) { for(int i = 1; i < z; i++) sum
What best describes what the following function does?
double yyy ( int vals[], int z) {
for(int i = 1; i < z; i++)
sum = sum + vals[i];
cout << sum / (z * 1.0);
}
| computes the average of all array elements |
| computes the average of all array elements except for the first and the last |
| does nothing, the array has not been initialized |
| computes the average of all array elements except for the first |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
