Precedence
and associativity of Operators
|
Operators
|
Associativity
|
|
()
[] → . |
Left
to right |
|
!
~ ++ – + - * & (type) sizeof |
Right
to left |
|
*
/ % |
Left
to right |
|
+
- |
Left
to right |
|
<<
>> |
Left
to right |
|
<
<= > >= |
Left
to right |
|
==
!= |
Left
to right |
|
& |
Left
to right |
|
^ |
Left
to right |
|
| |
Left
to right |
|
&& |
Left
to right |
|
|| |
Left
to right |
|
?: |
Right
to left |
|
=
+= -= *= /= %= &= ^= != <<= >>= |
Right
to left |
|
, |
Left
to right |
沒有留言:
張貼留言