Decision-making in programming allows a program to execute specific blocks of code based on certain conditions. It introduces logic into the program and makes it dynamic by enabling choices.
In C, decision-making constructs evaluate conditions (expressions that return true or false) and decide which part of the program to execute.
Types of Decision-Making Statements in C
ifStatementif-elseStatementelse ifLadder- Nested
ifStatements switchStatement
1. if Statement
The if statement executes a block of code only if a specified condition is true.
Syntax:
