#include using namespace std;int x;int * foo(){ return &x;}int & goo(){ return x;}int main(){ int *p = foo(); int &r = goo(); *p = 1; cout << x << endl; r = 2; cout << x << endl;}