Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- void swapping(int *ptr1, int *ptr2)
- {
- int temp;
- temp = *ptr1;
- *ptr1 = *ptr2;
- *ptr2 = temp;
- }
- int main()
- {
- int num1, num2;
- scanf("%d %d", &num1, &num2);
- swapping(&num1, &num2);
- printf("%d %d", num1, num2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement