Question: Explain what happens in the code given below Also provide an output. #include l/swap two values void swap(int iPtrX,int* iPtrY); void fakeswap(int x, int y)

Explain what happens in the code given below
Also provide an output.
 Explain what happens in the code given below Also provide an

#include l/swap two values void swap(int iPtrX,int* iPtrY); void fakeswap(int x, int y) int main() void swap(int* iPtrX, int* iPtrY) int temp; temp-iPtrX; iPtrY temp; int x 10; int y 20; void fakeswap(int x,int y) int temp printf("before swap: x2%d y2%d ",x,y); swap(p1,p2); printf("after swap: x:%d y2%d ",x,y); temp x y temp printf" printf("before fakeswap: x2%d y2%d "X,y); fakeswap(x.y); printf("after fakeswap: x2%d y_0d"..y); return 0 Show swap.c

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!