An operator takes values (operands) and produces a new value. Arithmetic, comparison, and logic are the everyday set.
An operator is a symbol that takes values and produces a new value. Plus adds, star multiplies, == asks “same?”, and && asks “both true?” The operator itself never prints — you print the result.
%d for ints).6 and 7 sit in memory
An operator never prints by itself.multiply
C also has + - / % and many others — see the cards below.the expression value
Integer math: 7 / 2 would be 3, not 3.5.show 42
Format %d matches int.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. 6 * 7 evaluates to:
Multiplication.
2. Integer 7 / 2 in C is:
Truncates toward zero for positive ints.
3. What does % do on ints?
Modulo.
4. An operator by itself prints:
You must print.
5. == vs = :
A classic C bug is if (n = 0).