#includeiostream
usingnamespacestd;
intmain()
{
intx = 10;
int& ref= x;
ref= 20;
cout "x = " x endl ;
x = 30;
cout "ref = " refendl;
return0;
}

Posted on by