C++ Expressions
An expression is collection of operators and operands which produce a unique value as result. The expressions are used to perform mathematical and logical operations in a program. In an expression operator is a symbol with pre-defined task and operands are the data values on which the operation is performed.
There are three types of expressions and they are as follows.
- Infix Expression
- Prefix Expression
- Postfix Expression
The most commanly used expression type is infix expression.
Infix Expression
In this type of expression the operator is between the operands.
Prefix Expression
In this type of expression the operator is in-front of the operands.
Postfix Expression
In this type of expression the operator is after the operands.