Click here to answer the quiz.
© 2015 – 2016, https:. All rights reserved. On republishing this post, you must provide link to original post
0 of 1 questions completed
Questions:
Click here to answer the quiz.
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
0 of 1 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Congrats !! You are in the top 1% people who got this one correct.
The If condition become true only when x is 3, at this point, x = 3, y = 3, z = 2.
++x = 4
But since || operator is used and first condition is successful, the comparison for y will not be executed.
So, only x will be incremented from that point onwards. Next iterations will be:
x= 5 y= 3 z= 3
x= 7 y= 3 z= 4
Well .. you are not alone.. lot of people got this one wrong.
Here is the explanation :
The If condition become true only when x is 3, at this point, x = 3, y = 3, z = 2.
++x = 4
But since || operator is used and first condition is successful, the comparison for y will not be executed.
So, only x will be incremented from that point onwards.Next iterations will be:
x= 5 y= 3 z= 3
x= 7 y= 3 z= 4
© 2015 – 2016, https:. All rights reserved. On republishing this post, you must provide link to original post
#
x=7 and y=3
#
I forgot the first increment of x on the last cycle but I got the logical or correct. This feature has been used to implement an LR parser in Fortran, Burroughs Algol, and later languages.
#
The answer seems to 8 & 4 when I executed the program. Could you recheck your explanation again?
#
you definitely made some mistakes coz this program gives the mentioned output,pls recheck.
#