Professional Documents
Culture Documents
Conditional Statements
What are control
statements?
Control statements in C help the
computer execute a certain logical
statement and decide whether to
enable the control of the flow
through a certain set of statements
or not.
it is used to direct the execution of
statements under certain
conditions.
Types of Control Statements in C
if( condition)
{
Statement 1;
}
Ex. Simple if statement
If-else Statement
if( condition)
Statement1;
else
Statement2;
If-else Statement
Nested if-else Statements
if( condition)
Statement1;
else
Statement2;
Nested if-else Statements