If Else Statement in C Language

Updated on May 31, 2025 | By Learnzy Academy

The if...else statement in C is used to make decisions based on conditions. It allows the program to execute different blocks of code depending on whether a condition is true or false.

Example - 

if (condition) {
    // Code to execute if the condition is true
} else {
    // Code to execute if the condition is false
}
Click here to download practice questions on If Else Statement