Decision Making in C Programming

The decision making statements in C language are used to perform operations on the basis of condition and when program encounters the situation to choose a particular statement among many statements.

Decision making statements lets you evaluate one or more conditions and then take decision whether to execute a set of statements or not.

By using decision making statements you can execute statements or select some statements to be executed base on outcome of condition(whether it is true or false). The outcome of conditional statement must be either true(In C, all non-zero and non-null values are considered as true) or false((In C, zero and null value is considered as false).

C Decision Making flow Diagram If statement

Different types of Decision Making statements in C

Click on the links below to check detailed description of control statements.

Control Statements Description.
If statements If statement is used to execute the code if condition is true
If else statements If else statement is used to execute a code when condition is true otherwise it execute another code in else section
Nested if statements We can use if statement inside another if statement, if we want to execute a code when multiple conditions become true
If else if ladder If else ladder is used, If we want to check for multiple conditions one after another
Switch statement Switch statement allows us to perform equality test of value of a variable against a list of possible values.