SlideShare a Scribd company logo
Control Structures in C Language
Typing Speed:19

Fasalul habeeb
fasalulhabeeb@gmail.com
www.facebook.com/Fasalul
habeeb
twitter.com/username
in.linkedin.com/in/profilenam
e
9544962714
Control Structures in C Language
• C language possesses such decision making
capabilities and supports the following
statements known as control or decisionmaking statements.
• if statement
switch statement
Conditional operator statement
goto statements
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 condition false;
}
if statement
•

Example

•
•
•
•
•
•
•
•
•
•
•
•
•

main()
{
int no1,mod;
printf("Enter a numbern");
scanf("%d",&no1);
mod=no1%2;
if(mod==0)
{
printf("the number is evenn");
}
else
{
printf("the number is oddn");
}

•

}
if-else-if statement
•
void main(void)
{
int numb;
printf("Type any Number : ");
scanf("%d", &numb);
if(numb > 0) {
printf("%d is the positive number", numb);
}
else if(numb < 0)
printf("%d is the Negative number", numb);
else printf("%d is zero",numb);
}
Switch Statement:
•
The switch and case statements help control
complex conditional and branching
operations.
The switch statement transfers control to a
statement within its body.
Example of a switch statement
• #include
main(){
int numb;
printf("Type any Number");
scanf("%d",&numb);
switch(numb %2)
{
case 0 : printf("the number %d is even ", numb);

}
}

case 1 : printf("the number %d is odd ", numb);
break;
break statement
•
•

•

break statement is used to exit from a loop or a switch, control passing to the first
statement beyond the loop or a switch.
Example
for(i=0;i<=10;i++)
{
if(i==5)
{
break;
}
printf(" %d",i);
}
Output:
0
1
2
3
4
The goto statement
• The goto is a unconditional branching statement
used to transfer control of the program from
one statement to another.
• syntax
• goto label;
• .............
• .............
• label:
• statement;
THE END
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.

Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550

Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550

More Related Content

What's hot

C if else
C if elseC if else
C if else
Ritwik Das
 
Pointers in C Language
Pointers in C LanguagePointers in C Language
Pointers in C Language
madan reddy
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
Wingston
 
Loops in c language
Loops in c languageLoops in c language
Loops in c language
tanmaymodi4
 
C++ string
C++ stringC++ string
C++ string
Dheenadayalan18
 
Loops c++
Loops c++Loops c++
Loops c++
Shivani Singh
 
C functions
C functionsC functions
Function C programming
Function C programmingFunction C programming
Function C programming
Appili Vamsi Krishna
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
tanmaymodi4
 
C Pointers
C PointersC Pointers
C Pointers
omukhtar
 
Data Types In C
Data Types In CData Types In C
Data Types In C
Simplilearn
 
[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP
Muhammad Hammad Waseem
 
structure and union
structure and unionstructure and union
structure and unionstudent
 
Pointers C programming
Pointers  C programmingPointers  C programming
Pointers C programming
Appili Vamsi Krishna
 
Arrays in c
Arrays in cArrays in c
Arrays in c
vampugani
 
Unit 7. Functions
Unit 7. FunctionsUnit 7. Functions
Unit 7. Functions
Ashim Lamichhane
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
Dipta Saha
 

What's hot (20)

C if else
C if elseC if else
C if else
 
Pointers in C Language
Pointers in C LanguagePointers in C Language
Pointers in C Language
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
 
Loops in c language
Loops in c languageLoops in c language
Loops in c language
 
C++ string
C++ stringC++ string
C++ string
 
Basic Input and Output
Basic Input and OutputBasic Input and Output
Basic Input and Output
 
Loops c++
Loops c++Loops c++
Loops c++
 
C functions
C functionsC functions
C functions
 
Control statement-Selective
Control statement-SelectiveControl statement-Selective
Control statement-Selective
 
Function C programming
Function C programmingFunction C programming
Function C programming
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 
C Pointers
C PointersC Pointers
C Pointers
 
Data Types In C
Data Types In CData Types In C
Data Types In C
 
Functions in C
Functions in CFunctions in C
Functions in C
 
[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP[OOP - Lec 01] Introduction to OOP
[OOP - Lec 01] Introduction to OOP
 
structure and union
structure and unionstructure and union
structure and union
 
Pointers C programming
Pointers  C programmingPointers  C programming
Pointers C programming
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Unit 7. Functions
Unit 7. FunctionsUnit 7. Functions
Unit 7. Functions
 
Programming in C Presentation upto FILE
Programming in C Presentation upto FILEProgramming in C Presentation upto FILE
Programming in C Presentation upto FILE
 

Viewers also liked

Control Structures
Control StructuresControl Structures
Control StructuresGhaffar Khan
 
Control Structure in C
Control Structure in CControl Structure in C
Control Structure in C
Neel Shah
 
Control statements
Control statementsControl statements
Control statements
Kanwalpreet Kaur
 
Control structure
Control structureControl structure
Control structure
Samsil Arefin
 
operators and control statements in c language
operators and control statements in c languageoperators and control statements in c language
operators and control statements in c language
shhanks
 
Loops in C Programming
Loops in C ProgrammingLoops in C Programming
Loops in C Programming
Himanshu Negi
 
Presentation on nesting of loops
Presentation on nesting of loopsPresentation on nesting of loops
Presentation on nesting of loopsbsdeol28
 
Conditional statement
Conditional statementConditional statement
Conditional statement
Maxie Santos
 
Control Structures in Visual Basic
Control Structures in  Visual BasicControl Structures in  Visual Basic
Control Structures in Visual BasicTushar Jain
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
Abhishek Dwivedi
 
Exception handling in c programming
Exception handling in c programmingException handling in c programming
Exception handling in c programming
Raza Najam
 
control structures in c if switch for
control structures in c if switch forcontrol structures in c if switch for
control structures in c if switch for
gourav kottawar
 
Jedi course notes intro to programming 1
Jedi course notes intro to programming 1Jedi course notes intro to programming 1
Jedi course notes intro to programming 1aehj02
 
Pascal programming language
Pascal programming languagePascal programming language
Pascal programming language
Verónica Meo Laos
 
Control structures ii
Control structures ii Control structures ii
Control structures ii
Ahmad Idrees
 
Introduction to mobile communication
Introduction to mobile communicationIntroduction to mobile communication
Introduction to mobile communication
alokahuti
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
Sathish Narayanan
 
Control structures i
Control structures i Control structures i
Control structures i
Ahmad Idrees
 

Viewers also liked (20)

Control Structures
Control StructuresControl Structures
Control Structures
 
Control Structure in C
Control Structure in CControl Structure in C
Control Structure in C
 
Control statement in c
Control statement in cControl statement in c
Control statement in c
 
Control statements
Control statementsControl statements
Control statements
 
Control structure
Control structureControl structure
Control structure
 
operators and control statements in c language
operators and control statements in c languageoperators and control statements in c language
operators and control statements in c language
 
Loops in C Programming
Loops in C ProgrammingLoops in C Programming
Loops in C Programming
 
Control structures in C
Control structures in CControl structures in C
Control structures in C
 
Presentation on nesting of loops
Presentation on nesting of loopsPresentation on nesting of loops
Presentation on nesting of loops
 
Conditional statement
Conditional statementConditional statement
Conditional statement
 
Control Structures in Visual Basic
Control Structures in  Visual BasicControl Structures in  Visual Basic
Control Structures in Visual Basic
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Exception handling in c programming
Exception handling in c programmingException handling in c programming
Exception handling in c programming
 
control structures in c if switch for
control structures in c if switch forcontrol structures in c if switch for
control structures in c if switch for
 
Jedi course notes intro to programming 1
Jedi course notes intro to programming 1Jedi course notes intro to programming 1
Jedi course notes intro to programming 1
 
Pascal programming language
Pascal programming languagePascal programming language
Pascal programming language
 
Control structures ii
Control structures ii Control structures ii
Control structures ii
 
Introduction to mobile communication
Introduction to mobile communicationIntroduction to mobile communication
Introduction to mobile communication
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
 
Control structures i
Control structures i Control structures i
Control structures i
 

Similar to Control structure in c

Session 3
Session 3Session 3
Unit ii chapter 2 Decision making and Branching in C
Unit ii chapter 2 Decision making and Branching in CUnit ii chapter 2 Decision making and Branching in C
Unit ii chapter 2 Decision making and Branching in C
Sowmya Jyothi
 
Unit 5 Control Structures.pptx
Unit 5 Control Structures.pptxUnit 5 Control Structures.pptx
Unit 5 Control Structures.pptx
Precise Mya
 
INPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN C
INPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN CINPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN C
INPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN C
Chandrakant Divate
 
Condition Stmt n Looping stmt.pptx
Condition Stmt n Looping stmt.pptxCondition Stmt n Looping stmt.pptx
Condition Stmt n Looping stmt.pptx
Likhil181
 
Elements of c program....by thanveer danish
Elements of c program....by thanveer danishElements of c program....by thanveer danish
Elements of c program....by thanveer danish
Muhammed Thanveer M
 
Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8
Shipra Swati
 
Fundamentals of programming)
Fundamentals of programming)Fundamentals of programming)
Fundamentals of programming)
jakejakejake2
 
C Programming Lesson 3.pdf
C Programming Lesson 3.pdfC Programming Lesson 3.pdf
C Programming Lesson 3.pdf
Rajeev Mishra
 
C language UPTU Unit3 Slides
C language UPTU Unit3 SlidesC language UPTU Unit3 Slides
C language UPTU Unit3 Slides
Rakesh Roshan
 
C programming session3
C programming  session3C programming  session3
C programming session3
Keroles karam khalil
 
C programming session3
C programming  session3C programming  session3
C programming session3
Keroles karam khalil
 
Control Structures in C
Control Structures in CControl Structures in C
Control Structures in C
sana shaikh
 
10control statement in c#
10control statement in c#10control statement in c#
10control statement in c#
Sireesh K
 
Programming in C
Programming in CProgramming in C
Programming in C
Nishant Munjal
 
Decision Control Structure If & Else
Decision Control Structure If & ElseDecision Control Structure If & Else
Decision Control Structure If & Else
Abdullah Bhojani
 

Similar to Control structure in c (20)

Session 3
Session 3Session 3
Session 3
 
if,loop,switch
if,loop,switchif,loop,switch
if,loop,switch
 
Unit ii chapter 2 Decision making and Branching in C
Unit ii chapter 2 Decision making and Branching in CUnit ii chapter 2 Decision making and Branching in C
Unit ii chapter 2 Decision making and Branching in C
 
Unit 5 Control Structures.pptx
Unit 5 Control Structures.pptxUnit 5 Control Structures.pptx
Unit 5 Control Structures.pptx
 
INPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN C
INPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN CINPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN C
INPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN C
 
Lec 10
Lec 10Lec 10
Lec 10
 
Condition Stmt n Looping stmt.pptx
Condition Stmt n Looping stmt.pptxCondition Stmt n Looping stmt.pptx
Condition Stmt n Looping stmt.pptx
 
Elements of c program....by thanveer danish
Elements of c program....by thanveer danishElements of c program....by thanveer danish
Elements of c program....by thanveer danish
 
Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8
 
Fundamentals of programming)
Fundamentals of programming)Fundamentals of programming)
Fundamentals of programming)
 
C Programming Lesson 3.pdf
C Programming Lesson 3.pdfC Programming Lesson 3.pdf
C Programming Lesson 3.pdf
 
Bsit1
Bsit1Bsit1
Bsit1
 
C language UPTU Unit3 Slides
C language UPTU Unit3 SlidesC language UPTU Unit3 Slides
C language UPTU Unit3 Slides
 
C programming session3
C programming  session3C programming  session3
C programming session3
 
C programming session3
C programming  session3C programming  session3
C programming session3
 
Control Structures in C
Control Structures in CControl Structures in C
Control Structures in C
 
10control statement in c#
10control statement in c#10control statement in c#
10control statement in c#
 
Programming in C
Programming in CProgramming in C
Programming in C
 
Decision Control Structure If & Else
Decision Control Structure If & ElseDecision Control Structure If & Else
Decision Control Structure If & Else
 
Elements of programming
Elements of programmingElements of programming
Elements of programming
 

More from baabtra.com - No. 1 supplier of quality freshers

Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
baabtra.com - No. 1 supplier of quality freshers
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
baabtra.com - No. 1 supplier of quality freshers
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
baabtra.com - No. 1 supplier of quality freshers
 
Php database connectivity
Php database connectivityPhp database connectivity
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
baabtra.com - No. 1 supplier of quality freshers
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Blue brain
Blue brainBlue brain
5g
5g5g
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Recently uploaded

PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 

Recently uploaded (20)

PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 

Control structure in c

  • 1.
  • 2. Control Structures in C Language Typing Speed:19 Fasalul habeeb fasalulhabeeb@gmail.com www.facebook.com/Fasalul habeeb twitter.com/username in.linkedin.com/in/profilenam e 9544962714
  • 3. Control Structures in C Language • C language possesses such decision making capabilities and supports the following statements known as control or decisionmaking statements. • if statement switch statement Conditional operator statement goto statements
  • 4. 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 condition false; }
  • 5. if statement • Example • • • • • • • • • • • • • main() { int no1,mod; printf("Enter a numbern"); scanf("%d",&no1); mod=no1%2; if(mod==0) { printf("the number is evenn"); } else { printf("the number is oddn"); } • }
  • 6. if-else-if statement • void main(void) { int numb; printf("Type any Number : "); scanf("%d", &numb); if(numb > 0) { printf("%d is the positive number", numb); } else if(numb < 0) printf("%d is the Negative number", numb); else printf("%d is zero",numb); }
  • 7. Switch Statement: • The switch and case statements help control complex conditional and branching operations. The switch statement transfers control to a statement within its body.
  • 8. Example of a switch statement • #include main(){ int numb; printf("Type any Number"); scanf("%d",&numb); switch(numb %2) { case 0 : printf("the number %d is even ", numb); } } case 1 : printf("the number %d is odd ", numb); break;
  • 9. break statement • • • break statement is used to exit from a loop or a switch, control passing to the first statement beyond the loop or a switch. Example for(i=0;i<=10;i++) { if(i==5) { break; } printf(" %d",i); } Output: 0 1 2 3 4
  • 10. The goto statement • The goto is a unconditional branching statement used to transfer control of the program from one statement to another. • syntax • goto label; • ............. • ............. • label: • statement;
  • 12. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 13. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550