#include<iostream>
int main()
{
int c = 2;
int& a=c;
int b = 1;
a = b;
std::cout << a<<std::endl;
std::cout << c << std::endl;
return 0;
}
#include<iostream>
t main()
{
int a=2;
int b=1;
int& c = b;
a = c;
b = 3;
std::cout << a << std::endl;
std::cout << c << std::endl;
return 0;
}
#include<iostream>
int& fn(int& n)
{
std::cout << n << std::endl;
n = 2;
return n;
}
int main()
{
int a=1;
int &c=fn(a);
c = 3;
std::cout << a << std::endl;
std::cout << c << std::endl;
return 0;
}