I need help with the following problem about swapping pointers.
The following code is in main:
main()
{
int x=1,y=2;
int *xp,*yp;
.
.
.
xp = &x;
yp = &y;
intpswap(<arg1>,<arg2>);
x=3;y=4;
printf("*xp = %d, *yp = %d\n",*xp,*yp);
} Write a function called intpswap that swaps what xp and yp point at,
and thus printf prints "*xp = 4, *yp =3".
I know how to swap int values by using a temp variable, but is it the same approach here?
Any help or hints will be greatly appreciated!!
Thank you!!