Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

image text in transcribed

(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

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

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

Students also viewed these Databases questions

Question

7. Understand the challenges of multilingualism.

Answered: 1 week ago

Question

5. Give examples of variations in contextual rules.

Answered: 1 week ago