Question: C++ given the function pass by reference void swap (int&first, int&second) int temp = first, first=second, second=temp; write a call to the function. modify the
C++

given the function pass by reference void swap (int&first, int&second) int temp = first, first=second, second=temp; write a call to the function. modify the parameters to be pass by value, report what happened. and then modify it back to pass by reference, explain the difference between pass by value and pass by reference. should a swap function be pass by value or pass by reference
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
