+ - * / % work on numbers. Integer / drops the fraction.
Arithmetic operators combine numbers: add, subtract, multiply, divide, remainder. This lesson multiplies 6 and 7 so you can watch a single expression become 42 and then get printed.
left
multiply
right
product
Each step highlights the matching C line. Program output appears only when a line that prints actually runs.
Five questions. Pick one answer each, then Check answers. The correct choice turns green.
1. This lesson prints:
6*7=42.
2. Which operator is remainder?
Modulo.
3. 7 / 2 as ints is 3 because:
Truncation.
4. To get a fraction you often need:
At least one floating operand.
5. 6 + 7 * 2 is:
* before + : 6+14=20.