Did not understand the coding part of reference variable

whu is the final value of a and b in output is 12

Hello @sethyamir5,

Initially, a = 10, now we created two reference variables b and c to a. So, a,b,c all have the same value of 10.
b++; b is incremented which means a,b,c now have the same value of 11.
c++; c is incremented which means a,b,c now have the same value of 12.

Now, when we print a and b both have the same value = 12.

@sethyamir5
Is it clear now?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.