+ 2
can anybody explain about value of z
15 Respostas
+ 2
Apollo Don't practice these questions because the answer cannot be predicted correctly since the evaluation is compiler dependent is all that I'm trying to say.
Press @ symbol and it will show you the names.
+ 2
~ swim ~ thank youđ
+ 1
But according to precedence postfix has higher priority so y is printed perfectly. Isn't it? I might be wrong or may be I am wrong.
Quite confusing.
+ 1
Apollo and ThĂ© Ka|yan M!shrÄ
Kindly read the answer provided by
~ swim ~ before you make any assumptions and get to a solution.
+ 1
Avinesh , thanx
0
~ swim ~ So "y" is printed perfectly because "x--" means that it is not modified but only accessed and is only modified during "--x".
Did I get it right?
0
Actually, the x-- changes the value of x, but the program doesn't detect it until --x.
Z, by the way, is ++b + --b
Since b=5, ++5 is 6, and --6, our new b, is 5, 5+6 equals: 11
0
In the Z first increasing ++ b mean z=6 NOT increasing b
Then by the add sign (+) and decrment -- that is --in the b so 5 become->4
Hence Z=6+4=10
0
I was still close, rightđ
0
Avinesh, It's just practice for the challenges. I hope you understand that working hard in guessing an answer based on the code is fun.
0
By the way, how do you refer to people