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 / *
A* (B+C/D) -E/F INTO POSTFIX
ReplyDeleteABCD/+*EF/-
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )