An operator specifies an operation to be performed that yields a value. An operand is an entity on which an operator acts. An operator may be made out of one or more consecutive characters. The addition operator is the single character '+', while the left shift operator is the two character sequence: "<<".
Operator Precedence |
( ) | grouping |
[ ] | indexing |
. -> | field selection |
- + | unary: minus plus |
* & | unary: indirection, address of |
++ -- | pre/post incr/decr |
sizeof() | size in bytes |
casts | type conversions |
* / % | multiplicative |
+ - | arithmetic |
<< >> | shift |
< > <= >= == !=" | compare |
~ & | ^ | bitwise |
! && || | logical |
? : | conditional |
= *= /= %= += -= <<= >>= &= ^= |= |
assignment |
, | comma *(sequencing) |