Can someone explain me the difference between them? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can someone explain me the difference between them?

// first code int total = 100 ; int sum = total ; cout << sum ; and // second code int total = 100 ; int &sum = total ; cout << sum ; both results sum 100

4th Jul 2018, 4:05 PM
Sonu Majhi
Sonu Majhi - avatar
1 Answer
+ 1
&sum is an alias of total
4th Jul 2018, 4:13 PM
E_E Mopho
E_E Mopho - avatar