The if Statement

The if statement is used to control the flow of the execution of statements in program. The general form of the if statement is
if (test condition)
The condition to be evaluated is placed in a pair of parenthesis immediately following the keywords if. First, the test condition is evaluated. If it is true then the statement (or set of statements) following if are executed. If the condition evaluates to false, the statement(or set of statements) following if are skipped.Thus there is a two way branching for the if statement: One for the true and the Other for the false condition.

No comments:

Post a Comment