Flow of Control :

Introduction Flow of Control :

Generally a program executes its statements from beginning to end. But not many programs execute all their statements in strict order from beginning to end. C++ of course provides such tools by providing statements so, such statements are called program control statements.

Statements :

Statements are the instructions given by the computer to perform any kind of action, be it data movements, be it making decisions or be it repeating actions. Statements form the smallest executable unit within a C++ program. Statement are terminated with a semicolon(;). C++ supports following conditional statements:

Statement Flow Control :

In a program, statements may be executed sequentially, selection or iteratively. Let us discuss what is meant by sequence,selection or iteration constructs.

Sequence :

The sequence construct means the statements are being executed sequentially.

Selection :

The selection construct means the execution of statements(s) depending upon a condition-test. If a condition evaluates to true, a course of action is followed otherwise another course of action is (if) followed.

Iteration :

The iteration construct means repetition of a set of statements depending upon a condition test. The iteration construct is also called looping construct.

Next Update


Currently, we are working on other servers, but soon we update our website with new content. So, stay tuned we are back soon with new content.

Free Courses