please explain how output is 42.ignore syntax errors.
6/6/2017 3:34:56 PM
(++a = 6) * (a++ = 7) = 42
@scott i understand how ++a is 6 but a++ should be 6 as well because a++ evaluates first then it increments.so i think answer should be 36=6*6
i agree how ++a is 6 but a++ evaluate first then its increments so i think a++ is 6.so answwr will be 36.can u explain how a++ is 7.?
but in c++ i got answer 42 not 36
++a=6..it will Increment the value of a=5...then a++=7..because this will increment the value of a..which was incremented before(a=6)
a++ will be 6 because it will execute first then incremental
like if i=5
then i=6 and j=5
Learn Playing. Play Learning
Send us a message