Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started