Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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 [ 1. 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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions