Operator Precedence Chart for referance

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

Leave a Reply

Your email address will not be published. Required fields are marked *