Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DYNAMICS 15 ,M 11:55 - 10:00 450 TR 115 10:0] Agadt11 Agad415 Mogad111 0 5, WM 140 115 FLUID MECHANICS LABS Write a C program

image text in transcribed
image text in transcribed
DYNAMICS 15 ,M 11:55 - 10:00 450 TR 115 10:0] Agadt11 Agad415 Mogad111 0 5, WM 140 115 FLUID MECHANICS LABS Write a C program to do the following tasks: 1. Create file midterm.txt contains at most 100 positive integers (the midterm grades), one grade per line. 2. Declare an integer array call it Grades to hold the midterm grades. 3. Fill the elements of the array Grades_from the file midterm.txt. 4. 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. 5. Let the function returns(by statement return) how many students got the maximum grade 6. The function prototype int statistic(int [.], int, float avg *, int max *); 7. Let the function calculate the average, the maximum grade for the grades in the array marks. 8. 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Organic Chemistry

Authors: Joseph M. Hornback

2nd Edition

9781133384847, 9780199270293, 534389511, 1133384846, 978-0534389512