PrecedenceOperatorDescriptionAssociativity
1++ --Suffix/postfix increment and decrementLeft-to-right
()Function call
[]Array subscripting
.Structure and union member access
->Structure and union member access through pointer
(<type>){<list>}Compound literal (C99)
2++ --Prefix increment and decrementRight-to-left
+ -Unary plus and minus
! ~Logical NOT and bitwise NOT
(<type>)Cast
*Indirection (dereference)
&Address-of
sizeofSize-of
_AlignofAlignment requirement (C11)
3* / %Multiplication, division, and remainderLeft-to-right
4+ -Addition and subtractionLeft-to-right
5<< >>Bitwise left shift and right shiftLeft-to-right
6< <=For relational operators < and Left-to-right
> >=For relational operators > and
7== !=For relational = and Left-to-right
8&Bitwise ANDLeft-to-right
9^Bitwise XOR (exclusive or)Left-to-right
10|Bitwise OR (inclusive or)Left-to-right
11&&Logical ANDLeft-to-right
12||Logical ORLeft-to-right
13?:Ternary conditionalRight-to-left
14=Simple assignmentRight-to-left
+= -=Assignment by sum and difference
*= /= %=Assignment by product, quotient, and remainder
<<= >>=Assignment by bitwise left shift and right shift
&= ^= |=Assignment by bitwise AND, XOR, and OR
15,CommaLeft-to-right