Question: writing the c code You are asked to write a program that manages the information of students in a class and calculates the overall grade
writing the c code
You are asked to write a program that manages the information of students in a class and calculates the overall grade average of the class. The program you write should use the struct block and the functions with the prototypes given below. You are expected to create the struct block according to the given definition and define the functions.
Struct Definition:
The struct named Student holds a students name and surname, number, and grade average. Note: Keep the students name and surname in a single string.
Functions:
void updateGradearguments;
This function, which takes a struct pointer and the updated grade as arguments, updates a students grade. The function does not need to return any value.
float overallGradeAveragearguments;
This function, which takes a struct array and its size as arguments, calculates and returns the overall grade average of all students based on their grade averages.
In the main function:
The program should first ask the user to enter the number of students in the class integer Then, it should create a struct array named students to hold the student information according to the entered number of students.
Next, it should ask the user for each students namesurname, number, and grade average elements of the students array
The program should then ask the user if there is a student whose grade average they want to change The answer can be yes or no If the users answer is yes the program should take the name and surname of the student whose grade average is to be changed and the new grade as input; the updateGrade function should be called with the appropriate struct variable and the new grade to update the students grade. Note: See the sample output. If the student whose grade is to be changed cannot be found, a new grade average should not be requested from the user. Note: Assume that the user always enters the correct yesno answer. In other words, the program does not need to check if an answer other than yesno is entered.
Finally, the program calculates and prints the overall grade average of all students using the overallGradeAverage function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
