Question: use (c) program thanks Write a C program to do the following tasks: Create file midterm.txt contains at most 100 positive integers (the midterm grades),

use (c) program thanks use (c) program thanks Write a C program to do the following

Write a C program to do the following tasks: Create file midterm.txt contains at most 100 positive integers (the midterm grades), one grade per line. Declare an integer array call it Grades to hold the midterm grades. Fill the elements of the array Grades from the file midterm.txt. Write a function call it statistic, which accepts the array Grades and its size as input parameters, and has two pointers as output parameters, the two pointers will be used to return the average of the midterm, and the maximum grade. Let the function returns(by statement return) how many students got the maximum grade The function prototype int statistic(int[], int, float avg *. int max *); Let the function calculate the average, the maximum grade for the grades in the array marks. Printout the average, maximum grade and how many students got the maximum grade in the main function using the following format exactly: Average = 0000.00 Maximum grade = 0000 Number of Maximum grades=0000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!