Question: Solution must be written in C++ Write a void function named smallSort2 that takes as parameters the addresses of three int variables and sorts the

Solution must be written in C++

Write a void function named smallSort2 that takes as parameters the addresses of three int variables and sorts the ints at those addresses into ascending order. For example if the main method has:

int first = 14; int second = -90; int third = 2; smallSort2(&first, &second, &third); cout << first << ", " << second << ", " << third << endl; 

Then the output should be:

-90, 2, 14 

This can be very similar to your previous smallSort program, but uses pointers instead of references.

The file must be named smallSort2.cpp.

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!