+ 13
Please explain value of y
5 Antworten
+ 5
y=x++ + x++ * x++;
x=3
y=3,then it's post-increment, x=4
y=3+4*,then again post -increment, x=5
y=3+4*5,then again post -increment ,x=6
y=23
x=6
Hope this helps
+ 13
@rishabh why do first x get post incremented at last while second and third x get post incremented even before product operator
+ 13
@rishabh I don't know why can't i understand it at first. Thanks a ton for your help
+ 5
No problem buddy.
Happy coding...
+ 4
y=3+4*5;
everytime it encounters x it's value is incremented and finally x becomes 6