figure moving operators to the right for postfix notationfigure moving operators to the left for prefix notationmultiplication symbol to that position and remove the matching left parenthesisgiving us bc*we would in effect have converted the subexpression to postfix notation if the addition operator were also moved to its corresponding right parenthesis position and the matching left parenthesis were removedthe complete postfix expression would result (see figure if we do the same thing but instead of moving the symbol to the position of the right parenthesiswe move it to the leftwe get prefix notation (see figure the position of the parenthesis pair is actually clue to the final position of the enclosed operator so in order to convert an expressionno matter how complexto either prefix or postfix notationfully parenthesize the expression using the order of operations then move the enclosed operator to the position of either the left or the right parenthesis depending on whether you want prefix or postfix notation here is more complex expression( bc ( ( gfigure shows the conversion to postfix and prefix notations general infix-to-postfix conversion we need to develop an algorithm to convert any infix expression to postfix expression to do this we will look closer at the conversion process consider once again the expression as shown aboveabc is the postfix equivalent we have already noted that the operands aband stay in their relative positions it is only the operators that change position let us look again at the operators in the infix expression the first operator that appears from left to right is howeverin the postfix expressionis at the end since the next operator*has precedence over addition the order figure converting complex expression to prefix and postfix notations basic data structures