SlideShare a Scribd company logo
Nested-if in C Programming
Md. Alamgir Hossain
Lecturer,
Dept. of CSE, Prime University
Mail: alamgir.cse14.just@gmail.com
Nested-if in C/C++
 Nested if statements means an if statement inside another if statement.
Yes, both C and C++ allows us to nested if statements within if statements, i.e, we can
place an if statement inside another if statement.
Syntax:
if (condition1)
{
// Executes when condition1 is true
if (condition2)
{
// Executes when condition2 is true
}
}
Example of nested-if in C/C++
Thank You

More Related Content

PPTX
inline function
DOCX
Operating System Process Synchronization
PDF
Java Garbage Collection - How it works
PPTX
If else statement in c++
PPTX
Inline function in C++
PPT
C# Encapsulation
PPTX
Dynamic memory allocation in c language
inline function
Operating System Process Synchronization
Java Garbage Collection - How it works
If else statement in c++
Inline function in C++
C# Encapsulation
Dynamic memory allocation in c language

What's hot (20)

PDF
Celery: The Distributed Task Queue
DOCX
C interview question answer 1
PPT
FUNCTIONS IN c++ PPT
PPTX
What is a Variable in C Language? | Variable Declaration and initialization.pptx
PDF
Nesting of for loops using C++
DOCX
Inline function(oops)
PPTX
What is Switch Case?
PDF
Java Thread Synchronization
PDF
JAVA PPT-1 BY ADI.pdf
PPTX
Operating system critical section
PPT
Structure and Enum in c#
PPT
Process Synchronization
PDF
AI Lesson 03
PPT
Object Oriented Language
PPTX
Switch case in C++
PDF
10. switch case
PPTX
INLINE FUNCTION IN C++
PPTX
Distributional semantics
PDF
Polymorphism In Java
PPTX
Polymorphism
Celery: The Distributed Task Queue
C interview question answer 1
FUNCTIONS IN c++ PPT
What is a Variable in C Language? | Variable Declaration and initialization.pptx
Nesting of for loops using C++
Inline function(oops)
What is Switch Case?
Java Thread Synchronization
JAVA PPT-1 BY ADI.pdf
Operating system critical section
Structure and Enum in c#
Process Synchronization
AI Lesson 03
Object Oriented Language
Switch case in C++
10. switch case
INLINE FUNCTION IN C++
Distributional semantics
Polymorphism In Java
Polymorphism
Ad

More from Alamgir Hossain (13)

PPTX
How to write a project proposal for software engineering course
PPTX
Malware Detection Approaches using Data Mining Techniques.pptx
PPTX
4. decision making and some basic problem
PPTX
3. user input and some basic problem
PPTX
2. introduction of a c program
PPTX
1. importance of c
PDF
Computer graphics lab report with code in cpp
PDF
Report on student-faculty document sharing android project
PDF
A lab report on modeling and simulation with python code
PDF
Lab report on to plot efficiency of pure and slotted aloha in matlab a data c...
PDF
Lab report for Prolog program in artificial intelligence.
PDF
Digital signal Processing all matlab code with Lab report
PPTX
Microsoft Teams
How to write a project proposal for software engineering course
Malware Detection Approaches using Data Mining Techniques.pptx
4. decision making and some basic problem
3. user input and some basic problem
2. introduction of a c program
1. importance of c
Computer graphics lab report with code in cpp
Report on student-faculty document sharing android project
A lab report on modeling and simulation with python code
Lab report on to plot efficiency of pure and slotted aloha in matlab a data c...
Lab report for Prolog program in artificial intelligence.
Digital signal Processing all matlab code with Lab report
Microsoft Teams
Ad

Recently uploaded (20)

PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Computing-Curriculum for Schools in Ghana
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Cell Types and Its function , kingdom of life
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
RMMM.pdf make it easy to upload and study
PPTX
Institutional Correction lecture only . . .
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Computing-Curriculum for Schools in Ghana
102 student loan defaulters named and shamed – Is someone you know on the list?
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
A systematic review of self-coping strategies used by university students to ...
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Final Presentation General Medicine 03-08-2024.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Cell Types and Its function , kingdom of life
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
RMMM.pdf make it easy to upload and study
Institutional Correction lecture only . . .
Chinmaya Tiranga quiz Grand Finale.pdf
01-Introduction-to-Information-Management.pdf
Complications of Minimal Access Surgery at WLH
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
O7-L3 Supply Chain Operations - ICLT Program

5 nested if in c with proper example

  • 1. Nested-if in C Programming Md. Alamgir Hossain Lecturer, Dept. of CSE, Prime University Mail: [email protected]
  • 2. Nested-if in C/C++  Nested if statements means an if statement inside another if statement. Yes, both C and C++ allows us to nested if statements within if statements, i.e, we can place an if statement inside another if statement. Syntax: if (condition1) { // Executes when condition1 is true if (condition2) { // Executes when condition2 is true } }