In C++ Language (please use hint) :
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 samller 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. amain()invoking your function).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here