Order of Evaluation
This section discusses the order in which expressions are evaluated but does not explain the syntax or the semantics of the operators in these expressions. The earlier sections provide a complete reference for each of these operators.
Expressions are evaluated according to the precedence and grouping of their operators. (Operator Precedence and Associativity in Lexical Conventions, shows the relationships the C++ operators impose on expressions.) Consider this example:
38 38 54
ExpressionEvaluation Order
The order in which the expression shown in the above figure is evaluated is determined by the precedence and associativity of the operators:

Multiplication (*) has the highest precedence in this expression; hence the subexpression b * c is evaluated first.

Addition (+) has the next highest precedence, so a is added to the product of b and c.

Left shift (<<) has the lowest precedence in the expression, but there are two occurrences. Because the leftshift operator groups lefttoright, the left subexpression is evaluated first and then the right one.
When parentheses are used to group the subexpressions, they alter the precedence and also the order in which the expression is evaluated, as shown in the following figure.
ExpressionEvaluation Order with Parentheses
Expressions such as those in the above figure are evaluated purely for their side effects — in this case, to transfer information to the standard output device.