i want to swap the cotent of x and y how would i do that in pointer
Code:#include<stdio.h> #include<conio.h> #include<stdlib.h> main() { int x=3; int y=4; int *ptr1=&x; int *ptr2=&y; int temp; temp=*ptr1; *ptr1=*ptr2; *ptr2=temp; printf("x is %i y is %i ",ptr1,ptr2); getch(); }