Question: Write a C program that represents students (Name, ID & GPA) as structs. Write the following functions: 1. write_data: takes a list of student structs

 Write a C program that represents students (Name, ID \& GPA)

Write a C program that represents students (Name, ID \& GPA) as structs. Write the following functions: 1. write_data: takes a list of student structs and file name, then writes the struct objects to a file with the name given [1 points]. 2. get_data: takes the name of the file, then reads and returns the data as a list of structs. [1 points]. 3. print_stats: takes a list of student structs and prints on the screen the average, standard deviation, min and max of the GPAs [0.5 points]. 4. print_data: takes a list of student structs and prints them on the screen in table format [0.5 points]. In main, use the above functions to [2 points]: 1. Prompt the user to choose whether to: a. Read students' data. b. Enter students' data. c. Calculate statistics of students' data, or d. Exit the program. 2. If a,b or c are chosen, then prompt the user to enter the name of the file. 3. If a is chosen, then print the data in the file given. 4. If c is chosen, then display statistics of the data in the file given. 5. If b is chosen, then allow the user to keep entering students' data till a reserved character is entered. Next, write the data to a file with the name given. 6. If d is chosen, then exit the program. Your code must handle edge cases and invalid data. Deadline: Monday, Feb 13 11:59pm

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!