C++ statements are the program elements that control how, and in what order, objects are manipulated.
Statements fall into one of the following categories:
Expression statements. These statements, discussed on topic , evaluate an expression either for its side effects or for its return value.
Null statements. These statements, discussed on topic , can be provided where a statement is required by the C++ syntax but where no action is to be taken.
Compound statements. These statements, discussed on topic , are groups of statements enclosed in curly braces ({}). They can be used wherever the grammar calls for a single statement.
Selection statements. These statements, discussed on topic , perform a test; they then execute one section of code if the test evaluates to true (nonzero). They may execute another section of code if the test evaluates to false.
Iteration statements. These statements, discussed on topic , provide for repeated execution of a block of code until some termination criterion is met.
Jump statements. These statements, discussed on topic , either transfer control immediately to another location in the function or return control from the function.
Declaration statements. Declarations, discussed on topic , introduce a name into a program. (Chapter 6 provides more detailed information about declarations.)