683 views

2 Answers

0 votes
0 votes
First of all, in case of postfix expression the value used in the expression evaluation is value before changing it. So though the ++ is performed before all the other the value for x would be 10 in the expression evaluation. So postfix is x++yb*a/-
0 votes
0 votes
z =x++-y*b/a

    = 5-(-10)*2/4

   = 5-(-20)/4

= 5 - (-5) =10

o/p is 10 and finally x = 6
edited by

Related questions

0 votes
0 votes
3 answers
1
mamta beniwal asked Jun 13, 2018
588 views
if x=y=z=-1then the values of x,y,z after++x && ++y ||++z is shown as x=0,y=-1, and z=0 Please explain the reason behind this as I am not getting the reason of z=0.
0 votes
0 votes
1 answer
2
CJ147 asked Oct 13, 2018
326 views
How does the following expression evaluate to if suppose n=2n=2; a[++n]=n++;
0 votes
0 votes
0 answers
3
Ajitesh Mandal asked Apr 3, 2017
397 views
What is the output of the program?? I think the output should be 2 2 1 . But on running the program gives the output 2 3 3 . Pls explain why that output 2 3 3 in details ...