Decision Control Statements:
The
decision control statements alter the normal sequential execution of the
statements of program depending upon the test condition to be carried out a
particular point in the program.
The
decision to be taken regarding where the control should transfers depends upon
the outcome of the test condition. The following Decision control statements
are supported by C:
a.
If statement
b.
If- else statement
c.
switch statement
d.
goto statement
The if statement:
The basic decision making statement used in most C
programs is the if statement. The different types of if statement are:
1.
Simple if statement 3. Nested if else
2.
if – else statement 4. Else – if ladder
Post a Comment