SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
Typing Speed
Week

Target Achieved

1

40

22

2

40

27

3

40

27
Jobs Applied
Week
1
2
3

Company

Designation

Applied Date

Current Status
CONTROL STRUCTURES IN C PROGRAM
Name SREEJITH.K
@gmail.com ksreejith7044@gmail.com
www.facebook.com/username sreejith kappoor
twitter.com/username
in.linkedin.com/in/profilename
sreejithk/76/576/b99/
Phonenumber 919562616566
CONTROL STRUCTURES IN C PROGRAM
• C language possesses such decision making
capabilities and supports the following statements
known as control or decision-making statements.
• There are two types of statements.
• Selection statement.
• Iteration statement.
Selection statements
• It provides decision making capability to a
program and they alter normal flow of control
based on their conditions. They are
• If
• if else
• if else if
• switch
Iteration statements
• It allows a set of instruction to be executed
repeatedly based on some conditions. They
are
• For loop
• While
If statement
• The if statement is a powerful decision
making statement and is used to control the
flow of execution of statements.
• It is basically a two-way decision statement.
IF ELSE
The if....else statement is an extension of the simple if
statement. The general form is
if (condition)
{
True-block statement(s)
}
else
{
False-block statement(s)
}
IF ELSE
PROGRAM TO KNOW THE NUMER IS POSITIVE OR NEGATIVE
• void main()
{
int numb;
printf ("Type any Number : ");
scanf ("%d", &numb);
if(numb > 0)
{
printf ("%d is the positive number", numb);
}
else
printf ("%d is the Negative number", numb);}
IF ELSE IF
• This makes selection from two alternatives.
• If one is selected the other will be skipped.
• But if the first one is not executed the second
one is selected.
IF ELSE IF
program to print the character is uppercase or lowercase or special
character

Printf(“enter the character”);
Scanf(“%c”,ch);
If(ch>=‘a’ && ch<=‘z’)
printf(“it is lower case”);
Else If(ch>=‘A’ && ch<=‘Z’);
printf(“it is upper case”);
Else
Printf(“it is special chara”);
Switch case
• Often a break statement is used as the last
statement in each case's statement list
• A break statement causes control to transfer
to the end of the switch statement
• If a break statement is not used, the flow of
control will continue into the next case
SWITCH
• The general syntax of a switch statement is:
switch ( expression )
{
case value1 :
statement-list1
case value2 :
statement-list2
case value3 :
statement-list3
case ...
}

If expression
matches
value2,
control jumps
to here
Sample program for switch
Printf ("enter the game moden");
scanf ("%c“,&n);
switch(n)
{
case '1' :
printf("play game n");
break;
case '2' :
printf("load game n");
break;}
while
• The syntax of while statement in C:
while (loop repetition condition)
statement
• Loop repetition condition is the condition which
controls the loop.
• The statement is repeated as long as the loop
repetition condition is true.
• A loop is called an infinite loop if the loop
repetition condition is always true.
An Example of a while Loop
Loop repetition condition

Statement

Loop control variable is the variable whose value controls loop repetition.
In this example, count_emp is the loop control variable.

5-20
For loop
• The syntax of for statement in C:
for (initialization expression;
loop repetition condition;
update expression)
statement
• The initialization expression set the initial value of the
loop control variable.
• The loop repetition condition test the value of the
loop control variable.
• The update expression update the loop control
variable.
An Example of the for Loop
To print the numbers
printf("enter the first number");
scanf("%d",&n);
printf("the numbers aren");
{
for(i=n;i<=100;i++)
printf("%d ",&i);}
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

Weitere ähnliche Inhalte

Andere mochten auch (6)

Ajax
Ajax Ajax
Ajax
 
Json
JsonJson
Json
 
Post and get methods
Post and get methodsPost and get methods
Post and get methods
 
Ajax
AjaxAjax
Ajax
 
Views and functions
Views and functionsViews and functions
Views and functions
 
Dom structure
Dom structure Dom structure
Dom structure
 

Ähnlich wie Control structers in c

2. Control structures with for while and do while.ppt
2. Control structures with for while and do while.ppt2. Control structures with for while and do while.ppt
2. Control structures with for while and do while.pptManojKhadilkar1
 
PPT_203105211_3.pptx
PPT_203105211_3.pptxPPT_203105211_3.pptx
PPT_203105211_3.pptxSaurabhNage1
 
Control statements anil
Control statements anilControl statements anil
Control statements anilAnil Dutt
 
Introduction to computer programming (C)-CSC1205_Lec5_Flow control
Introduction to computer programming (C)-CSC1205_Lec5_Flow controlIntroduction to computer programming (C)-CSC1205_Lec5_Flow control
Introduction to computer programming (C)-CSC1205_Lec5_Flow controlENGWAU TONNY
 
Control Structures.pptx
Control Structures.pptxControl Structures.pptx
Control Structures.pptxssuserfb3c3e
 
Control Flow Statements
Control Flow Statements Control Flow Statements
Control Flow Statements Tarun Sharma
 
Programming Fundamentals in C++ structures
Programming Fundamentals in  C++ structuresProgramming Fundamentals in  C++ structures
Programming Fundamentals in C++ structuresayshasafdarwaada
 
Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8Shipra Swati
 
C-Programming Control statements.pptx
C-Programming Control statements.pptxC-Programming Control statements.pptx
C-Programming Control statements.pptxSKUP1
 
C-Programming Control statements.pptx
C-Programming Control statements.pptxC-Programming Control statements.pptx
C-Programming Control statements.pptxLECO9
 
Control Statement IN C.pptx
Control Statement IN C.pptxControl Statement IN C.pptx
Control Statement IN C.pptxsujatha629799
 
NRG 106_Session 4_CLanguage.pptx
NRG 106_Session 4_CLanguage.pptxNRG 106_Session 4_CLanguage.pptx
NRG 106_Session 4_CLanguage.pptxKRIPABHARDWAJ1
 
Conditional Statement both conditional and loop.pptx
Conditional Statement both conditional and loop.pptxConditional Statement both conditional and loop.pptx
Conditional Statement both conditional and loop.pptxZenith SVG
 
Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming languageVasavi College of Engg
 

Ähnlich wie Control structers in c (20)

Control structures in C
Control structures in CControl structures in C
Control structures in C
 
Control statement in c
Control statement in cControl statement in c
Control statement in c
 
2. Control structures with for while and do while.ppt
2. Control structures with for while and do while.ppt2. Control structures with for while and do while.ppt
2. Control structures with for while and do while.ppt
 
PPT_203105211_3.pptx
PPT_203105211_3.pptxPPT_203105211_3.pptx
PPT_203105211_3.pptx
 
Control statements anil
Control statements anilControl statements anil
Control statements anil
 
Introduction to computer programming (C)-CSC1205_Lec5_Flow control
Introduction to computer programming (C)-CSC1205_Lec5_Flow controlIntroduction to computer programming (C)-CSC1205_Lec5_Flow control
Introduction to computer programming (C)-CSC1205_Lec5_Flow control
 
Control Structures.pptx
Control Structures.pptxControl Structures.pptx
Control Structures.pptx
 
Control structure
Control structureControl structure
Control structure
 
Control Flow Statements
Control Flow Statements Control Flow Statements
Control Flow Statements
 
Control structure in c
Control structure in cControl structure in c
Control structure in c
 
Control statement-Selective
Control statement-SelectiveControl statement-Selective
Control statement-Selective
 
Programming Fundamentals in C++ structures
Programming Fundamentals in  C++ structuresProgramming Fundamentals in  C++ structures
Programming Fundamentals in C++ structures
 
Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8Fundamental of Information Technology - UNIT 8
Fundamental of Information Technology - UNIT 8
 
C-Programming Control statements.pptx
C-Programming Control statements.pptxC-Programming Control statements.pptx
C-Programming Control statements.pptx
 
C-Programming Control statements.pptx
C-Programming Control statements.pptxC-Programming Control statements.pptx
C-Programming Control statements.pptx
 
Control Statement IN C.pptx
Control Statement IN C.pptxControl Statement IN C.pptx
Control Statement IN C.pptx
 
NRG 106_Session 4_CLanguage.pptx
NRG 106_Session 4_CLanguage.pptxNRG 106_Session 4_CLanguage.pptx
NRG 106_Session 4_CLanguage.pptx
 
Conditional Statement both conditional and loop.pptx
Conditional Statement both conditional and loop.pptxConditional Statement both conditional and loop.pptx
Conditional Statement both conditional and loop.pptx
 
Unit 3 principles of programming language
Unit 3 principles of programming languageUnit 3 principles of programming language
Unit 3 principles of programming language
 
Controls & Loops in C
Controls & Loops in C Controls & Loops in C
Controls & Loops in C
 

Mehr von baabtra.com - No. 1 supplier of quality freshers

Mehr von 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
 

Kürzlich hochgeladen

BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleCeline George
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 

Kürzlich hochgeladen (20)

BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Multi Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP ModuleMulti Domain Alias In the Odoo 17 ERP Module
Multi Domain Alias In the Odoo 17 ERP Module
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 

Control structers in c

  • 1.
  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 5. CONTROL STRUCTURES IN C PROGRAM Name SREEJITH.K @gmail.com ksreejith7044@gmail.com www.facebook.com/username sreejith kappoor twitter.com/username in.linkedin.com/in/profilename sreejithk/76/576/b99/ Phonenumber 919562616566
  • 6. CONTROL STRUCTURES IN C PROGRAM • C language possesses such decision making capabilities and supports the following statements known as control or decision-making statements. • There are two types of statements. • Selection statement. • Iteration statement.
  • 7. Selection statements • It provides decision making capability to a program and they alter normal flow of control based on their conditions. They are • If • if else • if else if • switch
  • 8. Iteration statements • It allows a set of instruction to be executed repeatedly based on some conditions. They are • For loop • While
  • 9.
  • 10. If statement • The if statement is a powerful decision making statement and is used to control the flow of execution of statements. • It is basically a two-way decision statement.
  • 11. IF ELSE The if....else statement is an extension of the simple if statement. The general form is if (condition) { True-block statement(s) } else { False-block statement(s) }
  • 12. IF ELSE PROGRAM TO KNOW THE NUMER IS POSITIVE OR NEGATIVE • void main() { int numb; printf ("Type any Number : "); scanf ("%d", &numb); if(numb > 0) { printf ("%d is the positive number", numb); } else printf ("%d is the Negative number", numb);}
  • 13. IF ELSE IF • This makes selection from two alternatives. • If one is selected the other will be skipped. • But if the first one is not executed the second one is selected.
  • 14. IF ELSE IF program to print the character is uppercase or lowercase or special character Printf(“enter the character”); Scanf(“%c”,ch); If(ch>=‘a’ && ch<=‘z’) printf(“it is lower case”); Else If(ch>=‘A’ && ch<=‘Z’); printf(“it is upper case”); Else Printf(“it is special chara”);
  • 15. Switch case • Often a break statement is used as the last statement in each case's statement list • A break statement causes control to transfer to the end of the switch statement • If a break statement is not used, the flow of control will continue into the next case
  • 16. SWITCH • The general syntax of a switch statement is: switch ( expression ) { case value1 : statement-list1 case value2 : statement-list2 case value3 : statement-list3 case ... } If expression matches value2, control jumps to here
  • 17. Sample program for switch Printf ("enter the game moden"); scanf ("%c“,&n); switch(n) { case '1' : printf("play game n"); break; case '2' : printf("load game n"); break;}
  • 18.
  • 19. while • The syntax of while statement in C: while (loop repetition condition) statement • Loop repetition condition is the condition which controls the loop. • The statement is repeated as long as the loop repetition condition is true. • A loop is called an infinite loop if the loop repetition condition is always true.
  • 20. An Example of a while Loop Loop repetition condition Statement Loop control variable is the variable whose value controls loop repetition. In this example, count_emp is the loop control variable. 5-20
  • 21. For loop • The syntax of for statement in C: for (initialization expression; loop repetition condition; update expression) statement • The initialization expression set the initial value of the loop control variable. • The loop repetition condition test the value of the loop control variable. • The update expression update the loop control variable.
  • 22. An Example of the for Loop To print the numbers printf("enter the first number"); scanf("%d",&n); printf("the numbers aren"); { for(i=n;i<=100;i++) printf("%d ",&i);}
  • 23. 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
  • 24. 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