Evaluating Arithmetic Expressions

What is Infix, Postfix and prefix expression

Infix express means that the operator is in between the two operands of what it is working on. Prefix expression notation requires that all operators precede the two operands that they work on. Postfix, on the other hand, requires that its operators come after the corresponding operands.

Infix Expression Prefix Expression Postfix Expression
A + B + A B A B +
A + B * C + A * B C A B C * +

How to Evaluat Arithmetic Expressions Using Generic Stacks