A variable is a named box in memory. The type decides the size of the box and how bits are read.
A variable is a named box in memory. The name is how you find it, the type is the shape of the box, and the value is whatever you last put inside. Until you put something in, you must not trust what is there.
%d for int, %f for float, %c for char.Each box is a variable. The label is the name. The number inside is the current value.
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. A variable is best described as:
Name + storage + type.
2. int n = 42; does what?
Initialize at declare time.
3. Which format prints an int?
%d is decimal int.
4. Why do types matter?
Size and interpretation.
5. Using n before you assign it is:
Garbage until assigned.