0Pricing
C Academy · Lesson

Operator Precedence

Evaluation order.

Why Precedence Matters

Precedence decides which operator runs first in an expression with several operators. It mirrors normal math: multiplication before addition.

#include <stdio.h>
int main(void) {
    printf("%d\n", 2 + 3 * 4);
    return 0;
}

Parentheses Override

Parentheses force evaluation order. Use them to make intent clear and override defaults.

#include <stdio.h>
int main(void) {
    printf("%d\n", (2 + 3) * 4);
    return 0;
}

All lessons in this course

  1. Arithmetic Operators
  2. Relational and Logical
  3. Assignment and Increment
  4. Operator Precedence
← Back to C Academy