Question: Write C function that receives three integer numbers b , c and d as arguments, sorts them ascendingly and returns through the same three arguments.

Write C function that receives three integer numbers b, c and d as arguments, sorts them ascendingly and returns through the same three arguments. In other words, after returning from the function, b should contain the minimum of three numbers and d should contain the maximum of them.Pass three variables by reference (using pointers), so that after returning from the sorting function, your caller function has access to the sorted variables. Inside the sorting function you can once call the function for finding the minimum that you wrote last week to find the minimum and then compare the other two to find the second smallest number.

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!