home *** CD-ROM | disk | FTP | other *** search
-
- 1 #include <stream.h>
- 2
- 3 void swap1(int x, int y);
- 4 void swap2(int &x, int &y);
- 5 void swap3(int *x, int *y);
- 6
- 7 main()
- 8 {
- 9 int i = 3;
- 10 int j = 4;
- 11
- 12 swap1(i , j);
- 13 cout << i << " " << j << "\n";
- 14
- 15 swap2(i , j);
- 16 cout << i << " " << j << "\n";
- 17
- 18 swap3(&i , &j);
- 19 cout << i << " " << j << "\n";
- 20 }
-
-