awesome-everything RU
↑ Back to the climb

Base CS from zero

Control flow: free-recall review

Crux Free-recall prompts across the control-flow unit. Answer each from memory first, then reveal the model answer and compare.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at middle altitude — in the sky
◷ 13 min

Recall beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of pulling it back is what makes the mechanism stick.

Goal

Reconstruct the unit’s spine from memory: what execution flow is, how the program counter produces it, how a compare plus a conditional jump makes a branch, how a backward jump makes a loop, and why a loop runs forever.

Recall before you leave
  1. 01
    What is execution flow, and what single thing determines it?
  2. 02
    Why is sequential (straight-line) execution the default, and how does the PC produce it?
  3. 03
    Explain how an if statement becomes a compare plus a conditional jump at the machine level.
  4. 04
    What does 'fall through' mean, and why does an if/else need an unconditional jump after the if-true block?
  5. 05
    What makes a loop, and why are while and for the same thing to the CPU?
  6. 06
    Why does an infinite loop happen, and can the CPU detect it?
Recap

If you could reconstruct each answer from memory, you hold the unit’s spine: execution flow is the order instructions actually run, set entirely by the program counter; the PC advances by default, giving straight-line code; a compare sets a flag and a conditional jump reads it to make a branch; an if/else is two PC destinations with a skip-jump on the boundary; a backward jump plus a top-of-loop test makes a loop, identical for while and for; and a loop runs forever when the tested value never changes — something the CPU can neither count nor detect.

Continue the climb ↑Control flow: trace the code
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.