Converting Infix to Postfix--Fully Parenthesized Expressions
Consider (((A+7)*(B/C))-(2*D))
Its postfix equivalent is A7+BC/*2D*-
Operands are just copied from input to output. Left parentheses and operations are pushed on a stack. When a right parenthesis occurs, the stack is popped, and the operation that is on top of the stack is output, while the left parenthesis is discarded.