Question: Question 5 6 pts Functions: Pass by Reference & Value Which of the following functions correctly swaps the values of the two variables that are
Question 5 6 pts Functions: Pass by Reference & Value Which of the following functions correctly swaps the values of the two variables that are passed to it (not simply in the local scope of the function, but in the scope in which the function was called)? void my swap(int x, int y) int tmp = X Xyi y = tmp; > void my swap(int **, int *y) Int* tmp = X XY y tmp: void my skap(int **, int "y) int - tmp = x; X = Y; y = tmp; 3 void my swap(int 8x, int &y) int to X5 XY 7 PM)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
