Question: 10. Write a C program in which three integers are taken from user via keyboard. Then the program prints them to screen in the main


10. Write a C program in which three integers are taken from user via keyboard. Then the program prints them to screen in the main program. The main program will pass the three numbers toa function named a_sort by a call-by-reference type of call. These three numbers will be ordered in ascending order by the function a_sort. a_sort function will be calling another function called swap which accomplish swapping the values of two variables if needed. At the end of your program, the first number will be the smallest and the last number will be the largest. The main program will again print these numbers to the screen (see below as example output). Do not use arrays to answer this problem. Use three integer variables. Below shows the terminal output of the program. Please Enter Three Integer Numbers: 318 Numbers Entered: 3 1 8 After (swap) Call: 1 3 8 Hint: The prototype of the functions would be the followings void a sort (int * , int * , int *) void swap (int * , int *)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
