Decision Making
Introduction to C
Structure of a C Program
Variables and Data Types
Input and Output
Operators in C
Decision Making
If Statement
if...else Statement
Nested if Statement
Nested if...else Statement
Switch Statement
Loops
For Loop
While Loop
Do While Loop
Loop Comparison
Arrays
Strings
Functions
Function Types
Library Functions
User-Defined Functions
Recursion Function
Pointers
Structures
File Handling
Common Mistakes
Ideas
Decision Making
Decision-making structures require that the programmer specifies one or more conditions to be evaluated by the program. These statements allow your code to "think" and take different paths based on data.
[Image of if-else flowchart in C programming]Example
Executing...
❌ Error:
✅ Output:
// Click Run ▶ to execute
🏋️ Test Yourself With Exercises
Take our quiz on Decision Making to test your knowledge.
Browse Quizzes »