Types of Decision Making




Types of Decision Making Statements

  • In C- Programming decision making statements are used for defining the group of statements which will be executed when condition is true.
  • If condition is false, then else part statements will be executed.
  • There are three types of decision making control statements in C language.
    1. if statements
    2. if else statements
    3. nested if statements
C Decision Making Statement

if statements :

  • In these type of statements, if condition is true, then the respective block of code will be executed.

C Syntax

if (condition is true) 
{ 
    Statements execute; 
}

if else statements :

  • In these type of statements, group of statements are executed when condition is true.
  • If condition is false, then else part statements will be executed.
  • C Syntax

    if (condition is true) 
    { 
        Statement1; Statement2; 
    } 
    else 
    { 
        Statement3; Statement4; 
    }

    Nested if statements :

  • These type of statement works like in this way for example If condition 1 is false, then condition 2 is checked and the statements are executed if it is true. If condition 2 also gets failure, then else part is executed.
  • C Syntax

    if (condition1)
    { 
        Statement1; 
    }
    else if(condition2) 
    { 
        Statement2;
    } 
    else Statement 3;


    View More Quick Examples


    Related Searches to c decision making statement

    Adblocker detected! Please consider reading this notice.

    We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

    We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

    We need money to operate the site, and almost all of it comes from our online advertising.

    Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

    ×