C programs are built from statements, statements from expressions, and expressions from operators and operands. C is usually rich in operators. Because of this richness, the rules that determine how operators apply to operands play a central role in the understanding of expressions. here goes the rules:
There are fifteen layers.
OPERATOR ASSOCIATIVITY
primary: ()[]->. left to right
unary: ! ~ ++ -- +(Positive)
-(Negative) *(Pointer) (type) sizeof right to left
multiplicative: * / % left to right
additive: + - left to right
shift: << >> l left to right
relational: < <= > >= left to right
equality: == != left to right
bitwise: & left to right
bitwise: ^ left to right
bitwise: | left to right
logical: && left to right
logical: || left to right
conditional: ?: right to left
assignment: = += -= *= /=
%= &= ^= |= <<= >>= right to left
comma: , left to right