‹ Back to the paper
Convert the following infix notation to postfix form. ( A / B + C ) / ( D * ( E − F )
Answer
Answer
AIThe printed expression is missing a closing bracket; taking the evidently intended, balanced expression $(A/B+C)/(D*(E-F))$ and converting using operator precedence and left-to-right scanning with a stack:
$(A/B+C) \to A\ B\ /\ C\ +$
$(E-F) \to E\ F\ -$
$(D*(E-F)) \to D\ E\ F\ -\ *$
Combining the two parts with the outer $/$:
Postfix: $A\ B\ /\ C\ +\ D\ E\ F\ -\ *\ /$
From ISC 2024 Specimen Computer Science Paper 1, question 2(i).