1.

Convert the following Infix expression to its equivalent Postfix expression, showing the stack contents for each step of conversion.A/B+C*(D-E)

Answer»
ElementStackPostfix
AA
//A
B/AB
++AB/
C+AB/C
*+*AB/C
(+*(AB/C
D+*(AB/CD
-+*(-AB/CD
E+*(-AB/CDE
)+*AB/CDE-
+AB/CDE-*
AB/CDE-*+



Discussion

No Comment Found

Related InterviewSolutions