C Operator Precedence Table
C Operator Precedence Table
difranco.net
C Operator Precedence Table
This page lists C operators in order of precedence (highest to lowest). Their associativity indicates in what order operators of
equal precedence in an expression are applied.
Note 1:
Parentheses are also used to group subexpressions to force a different precedence; such
parenthetical expressions can be nested and are evaluated from inner to outer.
Note 2:
Postfix increment/decrement have high precedence, but the actual increment or decrement of
the operand is delayed (to be accomplished sometime before the statement completes
execution). So in the statement y = x * z++; the current value of z is used to evaluate the
expression (i.e., z++ evaluates to z) and z only incremented after all else is done. See postinc.c
for another example.
Updated: 20111216
http://www.difranco.net/compsci/C_Operator_Precedence_Table.htm 1/1