Question: (b) Write a C program to read a student's name and three grades. These three grades are passed by reference to a void function named

 (b) Write a C program to read a student's name and

(b) Write a C program to read a student's name and three grades. These three grades are passed by reference to a void function named rankStudentGrades. This function arranges the three grades in ascending order (places the smallest value in the first argument, then the second and the largest value in the third). Finally, the program displays the student name, grades in ascending order, and the average. You may define another function to calculate the average. Maximum two decimal points. You may use the swap function as discussed in the lecture. void swap(int *x, int *y) { int temp; temp = *X; * = *y; *y = temp; return; Example: User's input Enter student's name = James Bond Enter student's first grade = 92 Enter student's second grade = 78 Enter student's third grade = 86 Output James Bond 78 86 92 85.33

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!