Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- void swap(int *a, int *b) {
- int t = *b;
- *b = *a;
- *a = t;
- }
- int main(int argc, char ** argv) {
- int a = 4;
- int b = 3;
- swap(&a, &b);
- std::cout << a << " " << b;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement