What is the postfix form of the infix expression A + B * C − D / E?
Correct answer A. A B C * + D E / −
Explanation
Multiplication and division bind tighter than addition and subtraction, and operators of equal precedence group left to right. So B * C is formed first, then added to A, giving A B C * +. Next D / E becomes D E /, and the subtraction applies last. Writing A B + first would wrongly add A and B before multiplying.
Answer checked How we write and check questions
Discussion