C_and_CPP 版 (精华区)

发信人: hua (pupa), 信区: C_and_CPP
标  题: C语言运算符表备忘录
发信站: 哈工大紫丁香 (Sat May 14 15:54:37 2005), 转信

运算符按照优先级大小由上向下排列,在同一行的运算符具有相同优先级。
第二行是所有的一元运算符。

运算符                                                结合方式

() [] -> .                                            由左向右
! ~ ++ -- + -  * & (类型) sizeof                      由右向左
* / %                                                 由左向右
+ -                                                   由左向右
<< >>                                                 由左向右
< <= >= >                                             由左向右
== !=                                                 由左向右
&                                                     由左向右
^                                                     由左向右
|                                                     由左向右
||                                                    由左向右
? :                                                   由右向左
= += -= *= /=  &= ^= |= <<= >>=                       由右向左
,                                                     由左向右

--

※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 219.217.235.95]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.351毫秒