求表达式 a<b?a:c<d?c:d 的运算顺序...
发布网友
发布时间:2022-04-26 18:32
我来回答
共1个回答
热心网友
时间:2023-10-21 04:54
a<b?a:(c<d?c:d)
运算符优先级和结合方向,从上到下,优先级依次降低:
() [] -> . 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