我新手,c语言关系运算符和赋值运算符,哪个优先级高?比如a=b>c怎么理解?
问题描述:
我新手,c语言关系运算符和赋值运算符,哪个优先级高?比如a=b>c怎么理解?
答
下面的是优先级排序上面的高下面的低,左右高低有描述.
() [] -> .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
a=b>c 相当于 a = (b> c)