i test this code in visual studio and on gdb online:
int a = 10;
int b = 15;
a = b = a++;
cout << a << " " << b;
in visual studio the output was 11 10 and in gdb the output was 10 10.
whay there is a difference?
what the correct output?
According to my understanding If given a = b = 6 it is actually:
b = 6
a = b
In our program it is like this:
b = a
a += 1
a = b
Therefore will print 10 10