‹ Back to the paper
Question 2(i)
2 marks
Computer ScienceISC 2025 Specimen Computer Science Paper 1ConversionData structures
Convert the following.
Convert the following infix notation to prefix form. (A - B) / C * (D + E)
Convert the following infix notation to prefix form.
$(A - B) / C * (D + E)$
Answer
Answer
Official answer keyInfix: $(A-B)/C*(D+E)$
Step 1: $(A-B) \to {-}AB$
Step 2: $(A-B)/C \to {/}{-}ABC$
Step 3: $(D+E) \to {+}DE$
Step 4: Combine the two results with $*$: ${*}\ {/}{-}ABC\ {+}DE$
Prefix form: $*/-ABC+DE$