PRASHNIKAप्रश्निका
Back to the paper

Convert the following infix notation to postfix form:

Computer Science20192 marksOne word
Convert the following infix notation to postfix form: $( A + B * C ) – ( E * F / H ) + J$

Answer

Answer

AI
$(A+B*C) - (E*F/H) + J$ Using operator precedence ($*$, $/$ before $+$, $-$) and left-to-right evaluation, and converting bracket by bracket: $(A+B*C) \to A\ B\ C\ *\ +$ $(E*F/H) \to E\ F\ *\ H\ /$ Combining with $-$ and then $+J$: Postfix: $A\ B\ C\ *\ +\ E\ F\ *\ H\ /\ -\ J\ +$
Data structures

From ISC 2019 Computer Science Paper 1, question 2(c).