#include using namespace std; void f(int& x, int* y) { x += 20; *y -= 10; } void f(int* x, int y) { *x += 20; y -= 10; } int main() { int x = 8; int y = 9; f(x,&y); cout << x << ' ' << y << endl; f(&y,x); cout << x << ' ' << y << endl; return 0; }