logo

Crowdly

The objective is to compute the statistics of Test-2 of Coding Cafe - in terms o...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

The objective is to compute the statistics of Test-2 of Coding Cafe - in terms of the highest score, lowest score and the average score. Please study the following main() function, which calls another function called getStats() in line 11:

  1 #include <stdio.h>

  2 #define MAX 186

  3 

  4 int main()

  5 {

  6   float test1[MAX];

  7   float highest,lowest,average;

  8   for (i=0; i<MAX; ++i)

  9     scanf("%d", &test1[i]);

 10 

 11   getStats(test1, &highest, &lowest, &average);

 12   printf("%f %f %f\n", highest, lowest, average);

 13 

 14   return 0;

 15 }                                                                     

(a) Write the function declaration (prototype) of getStats() function. No need to write the body of the function.

(b) Instead of the current version of line 11, suppose the function was invoked by writing

getStats(test1, highest, lowest, average); 
would it make any difference to the way the program works? Explain your answer.

More questions like this

Want instant access to all verified answers on dle.plaksha.edu.in?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!