+ 3

How does "Reference" work? I can't understand it. Please!

1st Nov 2017, 2:14 AM
Phyoe Min Thant
Phyoe Min Thant - avatar
2 odpowiedzi
+ 5
Reference means alias of a variable, any change made to it will reflects the affect on variable and vice-versa. e.g. int a; int& b = a; // this means b is an alias of a a=16; cout<<b; Output: 16
1st Nov 2017, 5:50 AM
Lakshay
Lakshay - avatar
1st Nov 2017, 2:27 AM
qwerty
qwerty - avatar