在C语言中,逻辑运算符中( )的优先级高于算术运算符

求高手指引!

第1个回答  2013-11-30
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
优先级从上到下依次递减,最上面具有最高的优先级,逗号操作符具有最低的优先级。
所以小括号拥有最高优先级。
第3个回答  2013-11-30
括号运算符是最高级的运算符。
第4个回答  2013-11-30
对。
相似回答
大家正在搜