Write down about the decision making statement if.

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

Author: Tanmay Chakrabarty

Tanmay Chakrabarty is a former CSE student, currently working as a Senior Software Engineer with 5+ years of experience in the field of Web Application development in PHP+MySQL platform with strong skills in Javascript, JQuery, JQuery UI and CSS. He tries to write notes every week but fails due to heavy loads of duty.

Recommended Recommends


Contact Us