September 2025
Intermediate to advanced
552 pages
14h 5m
English
ifIn our introductory example, listing 1.1, we saw two different constructs that allowed us to control the flow of a program’s execution: functions and the for iteration. Functions are a way to transfer control unconditionally. The call transfers control unconditionally to the function, and a return statement unconditionally transfers it back to the caller. We will come back to functions in chapter 7.
The for statement is different in that it has a controlling condition (i < 5 in the example) that regulates if/when the secondary block ({ printf(...) }) is executed. C has five conditional control statements: ...
Read now
Unlock full access