| Operator |
Purpose |
|
| + |
Addition |
| - |
Subtraction |
| * |
Multiplication |
| / |
Division |
| % |
Remainder after integer division (modulus) |
| Operator |
Purpose |
|
| - |
Minus (negative number) |
| ++ |
Increment (increase by 1) |
| -- |
Decrement (decrease by 1) |
| sizeof |
Size, in bytes |
| (type) |
Cast |
| Operator |
Purpose |
|
| < |
Less Than |
| <= |
Less Than Or Equal To |
| > |
Greater Than |
| >= |
Greater Than Or Equal To |
| Operator |
Purpose |
|
| == |
Equal To |
| != |
Not Equal To |
| Operator |
Purpose |
|
| && |
AND |
| || |
OR |
| ! |
NOT |
| Operator |
Purpose |
|
| & |
AND |
| | |
OR |
| ~ |
NOT |
| ^ |
XOR |
| << |
Shift Left |
| >> |
Shift Right |
| Operator Category |
Operators |
Associativity |
|
| unary operators |
- ++ -- ! sizeof (type) |
R to L |
| arithmetic multiply, divide and remainder |
* / % |
L to R |
| arithmetic add and subtract |
+ - |
L to R |
| relational operators |
< <= > >= |
L to R |
| equality operators |
== != |
L to R |
| logical operators |
&& || |
L to R |
| conditional operators |
? : |
R to L |
| assignment operators |
= += -= *= /= %= |
R to L |
[ Index | Technical Notes ]
DISCLAIMER
Page author: Dawn Rorvik (rorvikd@evergreen.edu)
Last modified: 05/20/2003
|