Skip to content
UPEEC

Operator Precedence

Which operators bind tighter: `*` before `+`, comparisons before `&&`, assignment last.

Easy
Comments 0

Famous trap: if (flags & MASK == 0) parses as flags & (MASK == 0). Use parentheses whenever in doubt.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.