22 Nov 2019

  • November 22, 2019
  • Amitraj
Flow Control Statements:

C++ provides control flow statements (also called flow control statements) which allow the programmer to change the CPU's path through the program. we will cover all three control statements briefly;


In C++, we have three types of control structure in structured programming:-

1. Sequence control structure  (straight line)
2. Selection/Decision control structure  (Branching)
3. Loop structure  (Iteration or Repetition)









1.) Sequence control structure  (straight line):-

sequence control structure refers to the line by line execution by which statements are executed sequentially. for example, carry out a series of read or write operations, Arithmetic operations or Assignments to variables.



2.) Selection/Decision control structure  (Branching):-

it is depending on whether a condition is true or false. The selection/decision control structure may skip the execution of an entire block of statements or even execute one block of statements instead of another.


3.) Loop Control structure (Iteration or Repetition):-

Loop control structure allows the execution of a block of statements multiple times until a specified condition is met.

Translate

Popular Posts