Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Evaluate the differences between money and capital markets.

Answered: 1 week ago

Question

1. Discuss the four components of language.

Answered: 1 week ago

Question

a. How many different groups were represented?

Answered: 1 week ago