Subject |
use in |
have example |
have purpose |
return |
indicate |
! | | | to negate the value of the operand | a boolean | logical NOT |
++ | prefix or postfix form | example expression | equivalent longer expression |
---|
a++; b=a++; ++a; b=++a; | a=a+1; b=a; a=a+1; a=a+1; a=a+1; b=a; |
| to increment its operand by one | a value called its result | |
-- | prefix or postfix form | example expression | equivalent longer expression |
---|
a--; b=a--; --a; b=--a; | a=a-1; b=a; a=a-1; a=a-1; a=a-1; b=a; |
| to decrement its operand by one | a value called its result | |
~ | | | to perform a bitwise complement | a value called its result | |