Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int x,y,*a,*b,temp;
- printf("Give the value of x and y\n");
- scanf("%d %d", &x, &y);
- a = &x;
- b = &y;
- temp = *b;
- *b = *a;
- *a = temp;
- printf("after the swap \n%d %d", x, y);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement