Q. Convert the following infix notations to postfix notations, showing stack and string contents at each step.

a) A + B - C * D

b) A * (( C + D)/E)


Answer :-

a=
A + B - C * D
(A + B) - ( C * D )
A B + - (C * D)
A B + - C D *
A B + C D * -


b=
A * (( C + D)/E)
A * ( C D + / E)
A * C D + E /
A C D + E / *

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post