SlideShare a Scribd company logo
C language
CONTROL STRUCTURE
- zeel vora
About in
control
structure
C language possesses such decision making
capabilities and supports the following
statements knows as control or decision-making
statements.
- If statement
- If...else
- nested if...else
- nested else..if
- switch statement
If statement....
The if statement is a powerful decision making
statement and is used to controlthe flow of
execution of statements. It is basically a two-
way decision statement and is used in
conjunction with an expression.
• Syntax
• If (conditional)
• {
• Block of statements
executed if conditional is
true;
• }
• else
• {
• Block of statements if
conditional false;
• }
Exampie :- If
statement...
If...else
The if..else statement executes some code if
the test expression is true (nonzero) and some
other code if the test expression is false(0)
Syntax of if...else
if (testExpression) {
//codes inside the body of if
}else{
//codes inside the body of
else }
Example :
if...else
statement
Nested if..else statement
Nested if else statement is same like if else statement, where new block of if
else statement is defined in existing if or else block statement.
Used when user want to check more than one conditions at a time
Syntax of
Nested If else
Statement
Example of
Nested if else
Statement
Control satkcher ppt

More Related Content

PPTX
Computer programming 2 - Lesson 7
PPTX
Computer programming 2 Lesson 9
PPTX
If and select statement
PDF
Lecture 8
PPSX
Conditional statement
PPTX
C# conditional branching statement
PPTX
Decision statements in vb.net
PPTX
Cse lecture-6-c control statement
Computer programming 2 - Lesson 7
Computer programming 2 Lesson 9
If and select statement
Lecture 8
Conditional statement
C# conditional branching statement
Decision statements in vb.net
Cse lecture-6-c control statement

What's hot (20)

PPTX
Selection statements
PPTX
Chapter 4 java
PPTX
Vb decision making statements
PDF
itft-Decision making and branching in java
PPTX
Cse lecture-7-c loop
PPTX
Control Statements in Java
PPTX
Data structures vb
PPTX
Constructs (Programming Methodology)
ODP
Gentle Introduction To Funcitonal Programming - Detroit.Code
PPTX
Python PCEP Variables
PPT
Mesics lecture 6 control statement = if -else if__else
PPTX
Regular expressions for JavaScript
DOCX
Chapter 4(1)
PPTX
7.pointers
PPTX
Java Decision Control
DOCX
Data type
PDF
A Brief Introduction to Type Constraints
PDF
Lecture 3 Conditionals, expressions and Variables
PPT
Welcome to lecture 4 in c programming
PPTX
Chapter 2 : Programming with Java Statements
Selection statements
Chapter 4 java
Vb decision making statements
itft-Decision making and branching in java
Cse lecture-7-c loop
Control Statements in Java
Data structures vb
Constructs (Programming Methodology)
Gentle Introduction To Funcitonal Programming - Detroit.Code
Python PCEP Variables
Mesics lecture 6 control statement = if -else if__else
Regular expressions for JavaScript
Chapter 4(1)
7.pointers
Java Decision Control
Data type
A Brief Introduction to Type Constraints
Lecture 3 Conditionals, expressions and Variables
Welcome to lecture 4 in c programming
Chapter 2 : Programming with Java Statements
Ad

Similar to Control satkcher ppt (20)

PPTX
C Programming: Control Statements in C Pgm
PDF
Python decision making
PPTX
Control Statement programming
PPTX
python conditional statement.pptx
PPTX
conditional statement in python day 5.pptx
PDF
W4-DecisionMaking.pdf. python document. CS
PPTX
Unit-2 control Structures.pptx.pptx20201
PPTX
Conditional control statements explains the programming constructs
PPTX
Java Control Statement Control Statement.pptx
PPTX
Unit II.pptx
PPTX
Flow of control C ++ By TANUJ
PPT
Decision making and branching
PPTX
Decision making and looping - c programming by YEASIN NEWAJ
PDF
Learn C# Programming - Decision Making & Loops
PPTX
Flow of control by deepak lakhlan
PDF
Computer Programming 1 Computer programmingComputer programmingComputer progr...
PDF
Introduction to computer programming (C)-CSC1205_Lec5_Flow control
PPTX
If and select statement
PPSX
Control Structures in Visual Basic
PPTX
If else statement 05 (js)
C Programming: Control Statements in C Pgm
Python decision making
Control Statement programming
python conditional statement.pptx
conditional statement in python day 5.pptx
W4-DecisionMaking.pdf. python document. CS
Unit-2 control Structures.pptx.pptx20201
Conditional control statements explains the programming constructs
Java Control Statement Control Statement.pptx
Unit II.pptx
Flow of control C ++ By TANUJ
Decision making and branching
Decision making and looping - c programming by YEASIN NEWAJ
Learn C# Programming - Decision Making & Loops
Flow of control by deepak lakhlan
Computer Programming 1 Computer programmingComputer programmingComputer progr...
Introduction to computer programming (C)-CSC1205_Lec5_Flow control
If and select statement
Control Structures in Visual Basic
If else statement 05 (js)
Ad

Recently uploaded (20)

PDF
Urban Design Final Project-Context
PPTX
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
PPTX
CLASSIFICATION OF YARN- process, explanation
PDF
Introduction-to-World-Schools-format-guide.pdf
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
PPTX
building Planning Overview for step wise design.pptx
PPTX
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
PPTX
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
PPTX
DOC-20250430-WA0014._20250714_235747_0000.pptx
PPTX
An introduction to AI in research and reference management
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
PPTX
Acoustics new for. Sound insulation and absorber
PPTX
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
PPTX
Special finishes, classification and types, explanation
PPTX
Tenders & Contracts Works _ Services Afzal.pptx
PDF
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
PDF
Pongal 2026 Sponsorship Presentation - Bhopal Tamil Sangam
PDF
Urban Design Final Project-Site Analysis
PDF
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
Urban Design Final Project-Context
BSCS lesson 3.pptxnbbjbb mnbkjbkbbkbbkjb
CLASSIFICATION OF YARN- process, explanation
Introduction-to-World-Schools-format-guide.pdf
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
building Planning Overview for step wise design.pptx
AC-Unit1.pptx CRYPTOGRAPHIC NNNNFOR ALL
Complete Guide to Microsoft PowerPoint 2019 – Features, Tools, and Tips"
DOC-20250430-WA0014._20250714_235747_0000.pptx
An introduction to AI in research and reference management
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
Acoustics new for. Sound insulation and absorber
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
Special finishes, classification and types, explanation
Tenders & Contracts Works _ Services Afzal.pptx
Skskkxiixijsjsnwkwkaksixindndndjdjdjsjjssk
Pongal 2026 Sponsorship Presentation - Bhopal Tamil Sangam
Urban Design Final Project-Site Analysis
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions

Control satkcher ppt

  • 2. About in control structure C language possesses such decision making capabilities and supports the following statements knows as control or decision-making statements. - If statement - If...else - nested if...else - nested else..if - switch statement
  • 3. If statement.... The if statement is a powerful decision making statement and is used to controlthe flow of execution of statements. It is basically a two- way decision statement and is used in conjunction with an expression. • Syntax • If (conditional) • { • Block of statements executed if conditional is true; • } • else • { • Block of statements if conditional false; • }
  • 5. If...else The if..else statement executes some code if the test expression is true (nonzero) and some other code if the test expression is false(0) Syntax of if...else if (testExpression) { //codes inside the body of if }else{ //codes inside the body of else }
  • 7. Nested if..else statement Nested if else statement is same like if else statement, where new block of if else statement is defined in existing if or else block statement. Used when user want to check more than one conditions at a time
  • 8. Syntax of Nested If else Statement
  • 9. Example of Nested if else Statement