+ 1
What is the output of the question with explanation?
int a=20; int &n=a; n=a++; a=n++; cout<<a<<","<<n;
3 Answers
+ 2
You using reference From now on, you can use both of these variables interchangeably.
The following assignments will give the same effect:
n = a++;
20 = 20;
a = n++;
21 = 20;
So, now a is equals 20 the same as n.
0
n =a++ in this line a post increment bcoz n is reference type then both value are 21 na
Why 20 20