Control
Statements in C++
The control statements enable us to specify the order in
which the various instructions in a program are to be executed by the computer.
They determine the flow of control in a program.
There are 4 types of control statements in C. They are:
1. Sequence control statements
Sequence Control statements ensure that the instructions in a
program are executed in the same order in which they appear in the program.
2. Decision control
statements or conditional statement
Decision and Case Control statements allow the computer to
take decision as to which statement is to be executed next. C++ has three major decision-making statements.
3. Case control
statements
Case Control statements also allow the computer to take decision as to which statement is to be executed next.
4. Repetition or
loop control statements
The Loop Control statement helps the computer to execute a
group of statements repeatedly.
No comments:
Post a Comment