Operator Type | Operator | Execution Order |
---|---|---|
Primary Expression Operators | () [] . -> expr++ expr-- |
left-to-right |
Unary Operators | * & + - ! ~ ++expr --expr (typecast) sizeof() |
right-to-left |
Binary Operators | * / % |
left-to-right |
+ - |
||
>> << |
||
< > <= >= |
||
== != |
||
& |
||
^ |
||
| |
||
&& |
||
|| |
||
Ternary Operator | ?: |
right-to-left |
Assignment Operators | = += -= *= /= %= >>= <<= &= ^= |= |
right-to-left |
Comma | , |
left-to-right |