Assignment operator ,赋值符
Arithmetic operators ,算术运算符
Compound assignment ,复合赋值符
符号 | 中文名称 |
---|
+= | 加等号 |
-= | 减等号 |
*= | 乘等号 |
/= | 除等号 |
%= | 取余等号 |
>>= | 右位移等号 |
<<= | 左位移等号 |
&= | 位与等号 |
^= | 位异或等号 |
|= | 位或等号 |
Increment and decrement ,增减符
Relational and comparison operators,关系比较符
符号 | 中文名称 |
---|
== | 是否等于号 |
!= | 是否不等于号 |
> | 大于号 |
< | 小于号 |
>= | 大于等于号 |
<= | 小于等于号 |
Logical operators,逻辑运算符
Conditional ternary operator,条件3元符
Comma operator,逗号符
Bitwise operators,位操作符
符号 | 中文名称 |
---|
& | 位与符 |
| | 位或符 |
^ | 位异或符 |
~ | 位非符 |
<< | 左位移符 |
>> | 右位移符 |
Explicit type casting operator,显式类型转换运算符
如: (int) float1、 int (float1),将float1的值转为整型
取大小符
指针操作符
符号 | 中文名称 | 示例 |
---|
& | 取址符 | 如:&var1,从变量var1取得内存地址 |
* | 取值符 | 如:*pointer1,从指针pointer1取得值(非取地址) |
(全文完)