Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
An expression consists of a sequence of constants, identifiers, and operators that the program evaluates by performing the operations indicated. The expression's purpose in the program may be to obtain the resulting value, or to produce side effects of the evaluation, or both (see the section "Side Effects and Sequence Points," later in this chapter).
A single constant, a string literal, or the identifier of an object or function is in itself an expression. Such a simple expression, or a more complex expression enclosed in parentheses, is called a primary expression.
Every expression has a type. An expression's type is the type of
the value that results when the expression is evaluated. If the
expression yields no value, it has the type void. Some simple examples of expressions are listed in Table
5-1 (assume that a has been
declared as a variable of type int,
and z as a variable of type float _Complex).