Question: 1. Compile and run the following program that defines 2 pointer variables on a function, reads 3 integer numbers and prints out the numbers sorted

 1. Compile and run the following program that defines 2 pointer

1. Compile and run the following program that defines 2 pointer variables on a function, reads 3 integer numbers and prints out the numbers sorted in ascending order. #include void sort(int, int *); int main() int a, b, c: printf("Please enter 3 integers: "); scanf("d d ed", ta, tb, cc): sort(a, b) sort(a, sc): sort (&b, se) printf("The sorted numbers: td td sd ", a, b, c): return 0; ) Page 4 of 5 CS 1160, Computing Fundamentals-Lab Pointers Week of an 2. 2021 void sort(int *x, int *y) (int temp: if (x > *y) temp - *x: *x*y: *y = temp:) Complete the table below: numbers Sorted numbers 8.7.12 0.6.-3 2. Modify the above program so that the program can sort an array of 7 integers in ascending order. Test the program by your own data. 3. Modify your program to include a function named maxm which finds and returns the max of the two numbers. The addresses of x. Y, and must be passed as parameters to the function mam

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!