‹ Back to the paper
Question 2(i)
2 marks
Computer ScienceISC 2025 Computer Science Paper 1ConversionData structures
Convert the following.
Convert the following infix notation to postfix form. (A - B / C) + (D * E / F) * G
Convert the following infix notation to postfix form.
$(A - B / C) + (D * E / F) * G$
Answer
Answer
$(A - B / C) + (D * E / F) * G$
Using operator precedence ($*$, $/$ before $-$, $+$) and left-to-right evaluation:
$(A - B/C) \to A\ B\ C\ /\ -$
$(D*E/F)*G \to D\ E\ *\ F\ /\ G\ *$
Combining the two with $+$:
Postfix: $A\ B\ C\ /\ -\ D\ E\ *\ F\ /\ G\ *\ +$