---
name: "operator"
section: "7"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/operator"
---

# operator(7)

C and C++ operator precedence and order of evaluation

## NAME

**operator** – C and C++ operator precedence and order of evaluation

## DESCRIPTION

| | |
| --- | --- |
| **Operator** | Associativity |
| -------- | ------------- |
| () \[\] -\> . | left to right |
| ! ~ ++ -- - (type) \* & sizeof new delete | 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 |
| \|\| | left to right |
| ?: | right to left |
| = += -= \*= /= %= \<\<= \>\>= &= ^= \|= throw | right to left |
| ?: (C++, third operand) | right to left |
| , | left to right |

## FILES

- */usr/share/misc/operator*
