| Operator | Associativity |
| () [] . -> expr++ expr-- | left-to-right |
| * & + - ! ~ ++expr --expr (typecast) sizeof | right-to-left |
| * / % | left-to-right |
| + - | left-to-right |
| >> << | left-to-right |
| < > <= >= | left-to-right |
| == != | left-to-right |
| & | left-to-right |
| ^ | left-to-right |
| | | left-to-right |
| && | left-to-right |
| || | left-to-right |
| ?: | right-to-left |
| = += -= *= /= %= >>= <<= &= ^= |= | right-to-left |
| , | left-to-right< |
Order of Operation : PEMDAS
- Parenthesis
- Exponents
- Multiplication
- Division
- Addition
- Subtraction

No comments:
Post a Comment