Question: IMPLEMENT the following swap _ function ( . . . ) and paste it in . Your correct solution should include the correct function signature,

IMPLEMENT the following swap_function(...) and paste it in. Your correct solution should include the correct function signature, and its implementation to produce the correct output as indicated in the main(...) snippet below. Please ONLY paste in your swap_function(...) NOT the entire console program.
int main(){
int x =5, y =6;
int* ptr1= &x;
int* ptr2= &y;
swap_function(&ptr1, &ptr2);
cout <<*ptr1<<*ptr2 ; // Prints 65"
return 0;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!