Computer Programming
Looping
DIT Part 1
Lecture 11
Break Statement
• The break statement terminates the loops (for,
while and do...while loop) immediately when
it is encountered.
• The break statement is used with decision
making statement such as if...else.
Syntax:
Break;
Copyrights By Tanveer Malik
Example of code
Copyrights By Tanveer Malik
Continue Statement
• The continue statement skips some
statements inside the loop. The continue
statement is used with decision making
statement such as if...else.
Syntax:
continue;
Copyrights By Tanveer Malik
Example of code
Copyrights By Tanveer Malik
Preprocessor Directive
• The C Preprocessor is not a part of the
compiler,
• It is a separate step in the compilation
process.
• In simple terms, a C Preprocessor is just a text
substitution tool and it instructs the compiler
to do required pre-processing before the
actual compilation.
• We'll refer to the C Preprocessor as CPP.
Copyrights By Tanveer Malik
Preprocessor Directive
• All preprocessor commands begin with a hash
symbol (#).
• It must be the first nonblank character, and for
readability, a preprocessor directive should
begin in the first column.
• The following section lists down all the
Copyrights By Tanveer Malik
Copyrights By Tanveer Malik
The Infinite Loop
Copyrights By Tanveer Malik
Assignment
– .
Lecture 11

More Related Content

PPTX
Java JIT Improvements Research
PDF
Introduction to Machine translation - AEM
PDF
Valgrind
PPTX
single pass compiler and its architecture
PDF
C tour Unix
PDF
Unit testing Ch. 13 of Programming Ruby
PPTX
Compiler vs interpreter
PPTX
CPP03 - Repetition
Java JIT Improvements Research
Introduction to Machine translation - AEM
Valgrind
single pass compiler and its architecture
C tour Unix
Unit testing Ch. 13 of Programming Ruby
Compiler vs interpreter
CPP03 - Repetition

What's hot (6)

PDF
Number of Computer Languages = 3
PPT
Compiler interpreter and_bootstrapping
ODP
Volatile
PDF
Erlang workshopdrammen
PPTX
Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi
PPT
What is machine translation
Number of Computer Languages = 3
Compiler interpreter and_bootstrapping
Volatile
Erlang workshopdrammen
Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi
What is machine translation
Ad

Similar to Lecture 11 (20)

PDF
Lecture 12
PPTX
Technical trainning.pptx
PDF
PyCon Canada 2019 - Introduction to Asynchronous Programming
PDF
Lecture 10
PPT
Compilers and interpreters
PPTX
PCSG_Computer_Science_Unit_1_Lecture_2.pptx
PPTX
Looping and switch cases
PPTX
Structured programming Unit-1-Introduction-to-C-Programming.pptx
PPTX
Introduction to compiler interpreter
PPTX
C-Sharp 6.0 ver2
PDF
Programming Fundamentals and basic knowledge
PPTX
C program execution and algorithm
PPTX
2CPP02 - C++ Primer
PPTX
Compiler Construction from very basic start
PDF
Highly concurrent yet natural programming
PPTX
Top 40 C Programming Interview Questions
PPTX
Programming Languages / Translators
PDF
Programming Sessions KU Leuven - Session 03
PDF
Running a Program.pdf
PPT
PreProcessorDirective.ppt
Lecture 12
Technical trainning.pptx
PyCon Canada 2019 - Introduction to Asynchronous Programming
Lecture 10
Compilers and interpreters
PCSG_Computer_Science_Unit_1_Lecture_2.pptx
Looping and switch cases
Structured programming Unit-1-Introduction-to-C-Programming.pptx
Introduction to compiler interpreter
C-Sharp 6.0 ver2
Programming Fundamentals and basic knowledge
C program execution and algorithm
2CPP02 - C++ Primer
Compiler Construction from very basic start
Highly concurrent yet natural programming
Top 40 C Programming Interview Questions
Programming Languages / Translators
Programming Sessions KU Leuven - Session 03
Running a Program.pdf
PreProcessorDirective.ppt
Ad

More from Tanveer Malik (20)

PDF
Lecture 12 security policy
PDF
Lecture 11 active directory
PDF
Lecture 10 i pv4 & ipv6
PDF
Lecture 9 file system
PDF
Lecture 8 disk management
PDF
Lecture 6 internet services in network
PDF
Lecture 5 software to control network
PDF
Lecture 4 sharing of resources on network
PDF
Lecture 3 transmission media
PDF
Lecture 2 protocol details
PDF
Lecture 1 networking types roles
PDF
Lecture 12
PDF
Lecture 9
PDF
Lecture 8
PDF
Lecture 7
PDF
Lecture 6
PDF
Lecture 5
PDF
Lecture 4
PDF
Lecture 3
PDF
Lecture 2
Lecture 12 security policy
Lecture 11 active directory
Lecture 10 i pv4 & ipv6
Lecture 9 file system
Lecture 8 disk management
Lecture 6 internet services in network
Lecture 5 software to control network
Lecture 4 sharing of resources on network
Lecture 3 transmission media
Lecture 2 protocol details
Lecture 1 networking types roles
Lecture 12
Lecture 9
Lecture 8
Lecture 7
Lecture 6
Lecture 5
Lecture 4
Lecture 3
Lecture 2

Recently uploaded (20)

PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
PDF
English Textual Question & Ans (12th Class).pdf
PDF
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
Race Reva University – Shaping Future Leaders in Artificial Intelligence
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PDF
semiconductor packaging in vlsi design fab
PDF
HVAC Specification 2024 according to central public works department
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
International_Financial_Reporting_Standa.pdf
PDF
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PDF
Journal of Dental Science - UDMY (2021).pdf
PPTX
Module on health assessment of CHN. pptx
PPTX
What’s under the hood: Parsing standardized learning content for AI
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 2).pdf
English Textual Question & Ans (12th Class).pdf
Mucosal Drug Delivery system_NDDS_BPHARMACY__SEM VII_PCI.pdf
Cambridge-Practice-Tests-for-IELTS-12.docx
Unit 4 Computer Architecture Multicore Processor.pptx
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Race Reva University – Shaping Future Leaders in Artificial Intelligence
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
semiconductor packaging in vlsi design fab
HVAC Specification 2024 according to central public works department
FORM 1 BIOLOGY MIND MAPS and their schemes
Introduction to pro and eukaryotes and differences.pptx
International_Financial_Reporting_Standa.pdf
BP 505 T. PHARMACEUTICAL JURISPRUDENCE (UNIT 1).pdf
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Journal of Dental Science - UDMY (2021).pdf
Module on health assessment of CHN. pptx
What’s under the hood: Parsing standardized learning content for AI
Paper A Mock Exam 9_ Attempt review.pdf.

Lecture 11

  • 2. Break Statement • The break statement terminates the loops (for, while and do...while loop) immediately when it is encountered. • The break statement is used with decision making statement such as if...else. Syntax: Break; Copyrights By Tanveer Malik
  • 3. Example of code Copyrights By Tanveer Malik
  • 4. Continue Statement • The continue statement skips some statements inside the loop. The continue statement is used with decision making statement such as if...else. Syntax: continue; Copyrights By Tanveer Malik
  • 5. Example of code Copyrights By Tanveer Malik
  • 6. Preprocessor Directive • The C Preprocessor is not a part of the compiler, • It is a separate step in the compilation process. • In simple terms, a C Preprocessor is just a text substitution tool and it instructs the compiler to do required pre-processing before the actual compilation. • We'll refer to the C Preprocessor as CPP. Copyrights By Tanveer Malik
  • 7. Preprocessor Directive • All preprocessor commands begin with a hash symbol (#). • It must be the first nonblank character, and for readability, a preprocessor directive should begin in the first column. • The following section lists down all the Copyrights By Tanveer Malik
  • 9. The Infinite Loop Copyrights By Tanveer Malik