C Programming/Conditional statements

C Conditional statements Intro

Updated on January 8, 2026
1 min read

Conditional statements in C Introduction

Conditional statements in C are used to make decisions.

They allow a program to execute different blocks of code based on whether a condition is true or false.

Why Conditional Statements Are Needed

  • To compare values
  • To take decisions in programs
  • To control the flow of execution
  • To perform different actions for different conditions

Types of Conditional Statements in C

C provides the following conditional (decision-making) statements:

  1. if statement
  2. if–else statement
  3. else–if ladder
  4. Nested if
  5. switch statement
C Conditional statements Intro | C Programming | Learn Syntax