Open In App

Why do we need Prefix and Postfix notations?

Prefix Notation:

Prefix notation is the notation in which operators are placed before the corresponding operands in the expression.



Example: 

Infix notation: A + B    
Prefix notation: +AB



Postfix Notation:

Postfix notation is the notation in which operators are placed after the corresponding operands in the expression.     

Example: 

Infix notation: A + B    
Postfix notation: AB+

Need of Prefix and Postfix Notations:

Advantages of Postfix over Prefix Notations:

Article Tags :