6.10
void exchange(int *p, int *p1){
int temp;
temp = *p1;
*p1 = *p;
*p = temp;
}
exchange(&i, &w);
cout << i << endl << w;
6.12
void exchange(int &p, int &p1){
int temp;
temp = p1;
p1 = p;
p = temp;
}
exchange(i, w);
cout << i << endl << w;