Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

3rd Edition

0760049041, 978-0760049044

More Books

Students also viewed these Databases questions