The way to write arithmetic expressions is known as a notation. An arithmetic expression can be written
in three different but equivalent notations, i.e., without changing the output of an
expression. These notations are - Infix, Postfix and Prefix. These notations are named as how they use
operators in expressions.
Infix |
Postfix |
Prefix |
In Infix notation, operators are written in-between operands.
|
In Postfix notation, the operator is postfixed to the operands i.e. the operator is written
after the operands.
|
In Prefix notation, the operator is prefixed to operands, i.e. the operator is written ahead
of the operands.
|
E.g. A + B |
E.g. A B + |
E.g. + A B |