Pages

Hello there!

Powered by Blogger.

Monday, January 7, 2013

IF DECISION MAKING STATEMENT IN C


IF DECISION MAKING STATEMENT IN C WITH EXAMPLE


The if statement is a powerful decision making statement and used to control the flow of execution of statements.

Syntax

if(condition)
{
Block of Statement
}
statement;

Note:-

# Condition can be expression or relation.
# If body of statement is only one statement than braces ({}) are not needed.
# Body of the statement may have one or more statement.

Execution:-

If condition is true than block of statement is executed otherwise statement next to if statement is executed.

Example:-

0 comments:

Post a Comment