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. Thefunction 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++
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here