T
Tavish Muldoon
Hello,
Would someone be able to explain what the resultant would be of this statement:
int i = 2;
int j = 3;
int k = 4;
i += j += ++k;
Would some one be able to translate this into 'english'?
I see it as 'add 1 to k' which now equals 5
then 'add 5 to j' which is 3+5=8
then 'add 2' which is the value of i
for a grand total of 10.
Is this correct?
Thanks,
Tmuld.
Would someone be able to explain what the resultant would be of this statement:
int i = 2;
int j = 3;
int k = 4;
i += j += ++k;
Would some one be able to translate this into 'english'?
I see it as 'add 1 to k' which now equals 5
then 'add 5 to j' which is 3+5=8
then 'add 2' which is the value of i
for a grand total of 10.
Is this correct?
Thanks,
Tmuld.