I am a little confused about the following behaviour:
int a = 3;
a++;
in b = a;
I understand that when you do a++
it will add a 1 which makes a = 4
and now b
equals a
so they are both 4.
int c = 3;
int d = c;
c++
But, here it tells me that c
is 4 and d
is 3. Since c++
makes c = 4
; wouldn't d = 4;
too?