Algebraic Expressions
An algebraic expression can be defined as follows...
Example : A = B + C; denote an expression in which there are 3 operands A, B, C and two operator + and =
An operator is a symbol that tells the computer to perform certain mathematical or logical manipulations. Operators are used in program to manipulate data and variables
Operands are the values on which the operators can perform the task.
Types of Algebric Expression
An algebraic expression can be represented in three different ways based on the operator position. They are as follows...
- Prefix Expression
- Infix Expression
- Postfix Expression
Prefix Expression
In prefix expression, operator is used before operands. We can say that "the operator precedes both Operands".
The general structure of Prefix expression is as follows...
Example
Infix Expression
In infix expression, operator is placed in between the operands.
The general structure of an Infix expression is as follows...
Example
Postfix Expression
In postfix expression, the operator is placed after the operands. We can say that "Operator follows both Operands".
The general structure of Postfix expression is as follows...
Example
Any expression can be represented using the above three different types of expressions. And we can convert an expression from one form to another form like Infix to Postfix, Infix to Prefix, Prefix to Postfix and vice versa.
0 Comment to "Infix Postfix Prefix"
Post a Comment