← All lectures

Lecture 06 · 35 min

Expressions & Operators

Operator precedence, named constants, increment / decrement, augmented assignment, and the compilation lifecycle.

PrecedenceConstants++ / --+=, -=, *=Errors revisited
Slide 1 / 16

Expressions — a quick recap

An expression is any combination of variables, constants, function calls, and operators that produces a value.

All expressions have a type — int, double, bool, etc. That type determines what operations are valid.

Examples:

  • 42 → int
  • 3.14 → double
  • 'A' → char
  • x + y * 2 → depends on types of x and y
  • x > 0 → bool
← / → navigateF fullscreenEsc exit⌘K search