Expressions and operators

Expressions are sequences of operators, operands, and punctuators that specify a computation. The evaluation of expressions is based on the operators that the expressions contain and the context in which they are used. An expression can result in a value and can produce side effects. A side effect is a change in the state of the execution environment.

The following sections describe these types of expressions:

Operator precedence and associativity provides tables listing the precedence of all the operators described in the sections on postfix, unary, and binary expressions.

C++ C++ operators can be defined to behave differently when applied to operands of class type. This is called operator overloading, and is described in Overloading operators (C++ only).