int x=3;
int &y=x;
cout<<"&x="<<&x<<endl;
cout<<"&y="<<&y<<endl;
x=5;
cout<<"y="<<y<<endl;
y=3;
cout<<"x="<<x;
the output is:
&x=AAAAAAAA
&y=AAAAAAAA
y=5
x=3
here y is a reference to x
as you can see here when you changed x, y also changed and vice-versa that's because y became x (the same address as you can see also in the first two lines)