Write down about the decision making statement if.

Last updated on June 13th, 2020 at 08:25 pm




The if statement : The if statement is a powerful decision making statement and is used to control the flow of execution of statements. It is basically a two way decision-statement. It takes the following form,




                        if(test expression)

This point of program has two paths to follow, one for the true condition and the other for the false condition. That is shown in the following figure,


The if statement may be used in different forms depending on the complexity of conditions to be tested. The different forms are,

  1.  Simple if statement
  2. if….else statement
  3. Nested if……else statement
  4. else if ladder

Leave a Reply

Your email address will not be published. Required fields are marked *