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