C语言问题啊啊啊
发布网友
发布时间:2022-05-10 03:50
我来回答
共4个回答
热心网友
时间:2023-10-29 10:01
先运算prt+1,然后是(prt+1)[2],最后是*((prt+1)[2])
运算符优先级的问题
c语言的操作符共有15个优先级,如下:
Operators Associativity
------------------------------------------------------------------
运算符 结合性
------------------------------------------------------------------
() [] -> . left to right
! ~ ++ -- + - * sizeof(type) 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
热心网友
时间:2023-10-29 10:01
先运算prt+1,然后是(prt+1)[2],最后是*((prt+1)[2])
运算符优先级的问题
c语言的操作符共有15个优先级,如下:
Operators Associativity
------------------------------------------------------------------
运算符 结合性
------------------------------------------------------------------
() [] -> . left to right
! ~ ++ -- + - * sizeof(type) 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
热心网友
时间:2023-10-29 10:02
先算prt+1呀
热心网友
时间:2023-10-29 10:02
prt+1;(prt+1)[2];*((prt+1)[2]);
热心网友
时间:2023-10-29 10:03
()的优先级最高
热心网友
时间:2023-10-29 10:02
先算prt+1呀
热心网友
时间:2023-10-29 10:02
prt+1;(prt+1)[2];*((prt+1)[2]);
热心网友
时间:2023-10-29 10:03
()的优先级最高