Question: 1 4 : 0 1 Lab Assessment ( 2 0 % ) . pdf 5 G 8 4 Question 2 Suppose you are working on

14:01
Lab Assessment (20%).pdf
5G
84
Question 2
Suppose you are working on a program that manages student records. Each student record contains the following information:
Student ID (an integer)
Student Name (a string)
Scores in three subjects (each score is a float)
You are required to write a program that performs the following tasks:
Define a structure named "Student" that contains the above information.
Define an array of "Student" structures to hold the records of 20 students.
Write a function named "readStudents" that reads the student records from a file named "students.txt"(you are required to create the file first) and stores them in the array of "Student" structures.
Write a function named "printStudents" that prints the student records in the following format:
\table[[ID,Name,Subject 1,Subject 2,Subject 3,Average Score],[1,John Doe,75.50,80.00,85.50,80.00],[2,Jane Smith,80.00,85.50,90.00,85.50]]
Write a function named "writeStudents" that writes the student records from the array of "Student" structures to a file named "report.txt" in the same format as above.
Calculate and print the average score of each subject.
Your program should have a main function that calls the above functions in the following order:
readStudents
printStudents
writeStudents
The program should display the average scores for all students to the output console.
Dashboard
Calendar
To Do
Notifications
Inbox
 14:01 Lab Assessment (20%).pdf 5G 84 Question 2 Suppose you are

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!