The statements which alter the
flow of execution of the program are called control statements. In the absence
of control statements, the instruction or statements are executed in the same
order in which they appear in the program. Sometimes, we may want to execute some
statements several times. Sometime we want to use a condition for executing
only a part of program. So, control statements enable use to specify the order
in which various instruction in the program are to be executed.
There are two
types of control statements:
1. Loops : for, while, do-while
2. Decisions: if, if...else, nested if....else,
switch
Comments
Post a Comment