0% found this document useful (0 votes)
10 views1 page

9-Decision Making in C (If, If..else, Nested If, If-Else-If)

The document discusses decision-making in C programming, focusing on conditional statements like if, if-else, and switch. These statements are essential for evaluating conditions and controlling the flow of program execution. It outlines the need for such statements in programming, drawing parallels to real-life decision-making scenarios.

Uploaded by

shubhrajkumar707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

9-Decision Making in C (If, If..else, Nested If, If-Else-If)

The document discusses decision-making in C programming, focusing on conditional statements like if, if-else, and switch. These statements are essential for evaluating conditions and controlling the flow of program execution. It outlines the need for such statements in programming, drawing parallels to real-life decision-making scenarios.

Uploaded by

shubhrajkumar707
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Decision Making in C (if , if..

else, Nested if, if-else-if )


Last Updated : 10 Jan, 2025

The conditional statements (also known as decision control structures) such as if, if else, switch, etc. are used for
decision-making purposes in C programs.

They are also known as Decision-Making Statements and are used to evaluate one or more conditions and make
the decision whether to execute a set of statements or not. These decision-making statements in programming
languages decide the direction of the flow of program execution.

Need of Conditional Statements


There come situations in real life when we need to make some decisions and based on these decisions, we decide
what should we do next. Similar situations arise in programming also where we need to make some decisions and
based on these decisions we will execute the next block of code. For example, in C if x occurs then execute y else
execute z. There can also be multiple conditions like in C if x occurs then execute p, else if condition y occurs
execute q, else execute r. This condition of C else-if is one of the many ways of importing multiple conditions.

Types of Conditional Statements in C

Following are the decision-making statements available in C:

1. if Statement
2. if-else Statement
3. Nested if Statement
4. if-else-if Ladder
5. switch Statement
6. Conditional Operator
7. Jump Statements:
break
continue
goto
return

Let’s discuss each of them one by one.

1. if in C

You might also like