Write a function which will swap its arguments if the first argument is greater than its second argument, but will not interchange them if the first argument is smaller than or equal to the second...


Write a function which will swap its arguments if the first argument is greater than its second argument,
but will not interchange them if the first argument is smaller than or equal to the second argument. The
function should return 1 if a swap was made, and 0 otherwise.(Hint: Make sure to use call by reference.)
Write also a short test driver(i.e. a main() invoking your function).


C++



Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here