Two small features that make C readable: enum gives numbers names, typedef gives types nicknames.
1 Named numbers
An enum gives small integer constants readable names — RED is really 0.
2 Auto-numbering
Members count up from 0 automatically unless you assign a value yourself.
3 typedef = nickname
typedef creates an alias so you can write Count instead of unsigned long long.
4 Better together
typedef enum turns enum TrafficLight into just TrafficLight in declarations.
Names for numbers, nicknames for types
Named numbers1An enum gives small integer constants readable names — RED is really 0. Auto-numbering2Members count up from 0 automatically unless you assign a value yourself. typedef = nickname3typedef creates an alias so you can write Count instead of unsigned long long. Better together4typedef enum turns enum TrafficLight into just TrafficLight in declarations. 4 building blocks make up Names for numbers, nicknames for types
Press play — GREEN hides the number 2, and the comparison works exactly like plain ints.
preprocessThe preprocessor pastes in stdio.h — printf comes from there.
Memory
no variables yet — press play
Console
output appears as the program runs…
Click a term, then click what it does to lock the pair.
5 conceptsTap a card to expand ?enumdrops into place
?typedefdrops into place
?RED, YELLOW, GREENdrops into place
?SMALL = 1drops into place
?typedef struct Player Player;drops into place
Explicit values are in play — what lands in x?
Your predicted output — one line per console line
Hint: Explicit values override auto-numbering — MID is 5 and BIG is 9, so s + BIG is 5 + 9.
Enums make each branch readable — no magic numbers in the conditions.
process decision input / output start / end
01Enums turn magic numbers like 2 into readable names like GREEN.
02Members auto-count from 0 unless you assign values yourself.
03typedef is just an alias — the real type never changes.
04typedef enum pairs give you clean names without repeating the keyword.
05Enums in switch statements make every case label self-explanatory.