Guided Notes

Operators & Booleans

Arithmetic, assignment, comparison, and logical operators; integer division and remainder; booleans with stdbool.h; and precedence.

Arithmetic and assignment

Slide 1 / 5
OperatorMeaningExample (int a = 17, b = 5)
+ - *Add, subtract, multiplya * b → 85
/Divide (integer if both ints)a / b → 3
%Remainder (ints only)a % b → 2
++ --Increment / decrementa++ → a becomes 18
= += -= *= /= %=Assign / updatea += 3 → 20
← Variables, Data Types & Constants