A few tools will need to be added to the toolkit in order to begin writing simple C/C++ programs. This chapter discusses C/C++’s control statements. Many of these control statements are similar to other high-level language controls, such as if, if-else, and switch statements and for, while, and do-while loops. However, there are several new control statements unique to C/C++, such as the ? (conditional), break, and continue statements.
The new controls, introduced here, typically have no equivalent in the traditional, older high-level languages such as FORTRAN, COBOL, and Pascal. Therefore, beginner C/C++ programmers leave them out of their problem solutions. That is unfortunate for two reasons. First, it means they are not taking advantage of the coding efficiencies provided by these new controls. Second, it immediately flags them as beginners.