1. Simple if:
The syntax is given below
if(expression)
statement;
or
if(expression)
{
Block of statements
}
First expression evaluates if it is true then only statement will be executed.
Eg. if (n>0)
cout<<n<<” is positive”;
2. if else:
The syntax is given below.
if (expression)
statement 1;
else
statement 2;
or
if(expression)
{
statement block 1;
}
Else
{
statement block 2;
}
First expression evaluates if it is true
statement block 1 will be executed otherwise
statement block 2 will be executed.
Only one block will be executed at a time so it is called branching statement.
Eg. if (n>0)
cout<<<n<<"is positive”
else
cout<<<n<<"is negative”;
3. if else if ladder:
The syntax will be given below
if (expression 1)
{
statement block 1;
}
else if (expression 2)
{
statement block 2;
}
else if (expression 3)
{
statement block 3;
}
.....
else
{
statement block n;
}
Here first expression 1 will be evaluated if it is true only the statement block 1 will be executed otherwise expression 2 will be executed if it is true only the statement block2 will be executed and soon. If all the expression evaluated is false then only statement block n will be evaluated.
Eg
If(mark>=90)
cout«<<“Your grade is A+”;

4. conditional operator:
It is a ternary operator and it is an alternative for if else construct. The syntax is given below. expression 1? expression 2: expression 3; or expression 1? Value if true: value if false; Here expression 1 will be evaluated if it true expression 2 will be executed otherwise expression 3 will be executed.
Eg. n>0?cout<<n<<"is positive”:cout<<n<<"is negative”;
5. Switch:
It is a multiple branch statement. Its syntax is given below.
switch(expression)
