All Operators

All Operators

A compact scan page listing the main C and C++ operators, punctuators, and alternative operator tokens.

How to use this reference page

Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.

  • Scan the top of the page first to identify the primary types, functions, or algorithm families involved.
  • Use the nearby-page links when your question is really about a companion header, related algorithm family, or broader subsystem.
  • Validate tricky behavior with a small compileable example before relying on memory for details like invalidation, ordering, allocation, or lifetime rules.

All Operators

This page is optimized for fast scanning. Use Operators and punctuators when you want the grouped explanations and caveats.

Arithmetic

Comparison

Logical

Bitwise and shifts

Assignment and conditional

Access and calls

Punctuation and separators

Practical use

Example in practice

int main() {
    int total = 0;
    for (int i = 0; i < 4; ++i) {
        total += i;
    }

    return total == 6 ? 0 : 1;
}