c语言的操作符共有15个
优先级,如下:
() [] -> . 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
优先级从上到下依次递减,最上面具有最高的优先级,逗号操作符具有最低的优先级。
所以小括号拥有最高优先级。