0 votes 0 votes After executing the program, I am getting 10 as the answer. Please explain and give the postfix for the expression [ z=x++-y*b/a ]. Programming in C programming-in-c + – bahirNaik asked Jan 13, 2016 bahirNaik 664 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
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/- Sumit1311 answered Jan 13, 2016 Sumit1311 comment Share Follow See all 0 reply Please log in or register to add a comment.
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 indrajeet answered Feb 3, 2016 • edited Feb 3, 2016 by indrajeet indrajeet comment Share Follow See all 0 reply Please log in or register to add a comment.