Question: Write a C program roster.c that enters a class roster from a file roster.dat. The class roster contains records for some (not known in advance)
Write a C program roster.c that enters a class roster from a file roster.dat. The class roster contains records for some (not known in advance) number of students. The record for each student consists of the last name, first name, and some scores for homeworks separated by spaces. The scores are integer numbers in the range [1..99].
Example:
Blue Larry 78 93 67 95
Brown Smith 87 56 90 49
Green Erin 90 78 64 87
Silver Eric 86 70 74 87
Orange John 96 89 75 85
Yellow Sarah 99 67 98 67
Your program must read the records and compute the average score for each student rounded off to the nearest integer and output these averages. the above example the output should be:
Blue Larry 78 93 67 95 83
Brown Smith 87 56 90 49 71
Green Erin 90 78 64 87 80
Silver Eric 86 70 74 87 79
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
