Control flow is the order in which a program's statements and functions execute. In C, ordinary sequencing can be understood from syntax and controlling expressions, while function calls temporarily suspend the caller until a return transfers execution back. section 2.4.3 section 19.0
Use these structural ideas to read control flow:
- Treat a basic block as a maximal sequence that begins at one entry point and continues unconditionally to its end. section 19.0
- Recognize block boundaries at compound-statement beginnings, labels, conditional or loop bodies, return statements, goto targets, and selected function calls. section 19.0
- Prefer visibly structured compound statements and comprehensive control statements; buried jumps and overly intricate controlling expressions make flow difficult to follow. section 10.2
- Use functions as modular control-flow units: a call suspends the current execution point, and return resumes it or passes control onward. section 2.4.3
A small program's execution
Execution begins in a platform-provided startup routine, enters main, and then calls printf. While printf executes, main is suspended; printf returns to main, and main's return passes control back to the startup routine, ending the program from the programmer's viewpoint. section 2.4.3
Figure 2.1 Execution of a small program
Trace the transfers among startup code, main, and printf in the execution schematic. section 2.4.3



