Conditional Branching Statement

The Conditional branching  statements help to jump from one part of the program to another depending on whether a particular condition is satisfied or not.These decision control statements include.

  • if statement
  • if -else statement
  • if-else-if statement
  • Switch statement
If statement

The if statement is the simplest form of decision control statements that is used in decision making.


Syntax of If statement:


if(test expression)
{
   statement 1;
   ...................
  statement n;
}
statement x;


Comments