SlideShare a Scribd company logo
1 of 9
Programming Errors/ Bugs
 Bug
 Debugging
 Types of Programming Errors / Bugs
 Syntax Errors
 Run-time Errors
 Logical Errors
@YouTube: Learn to Lead Computer Science
Unexpected output produced by program.
Debugging
The process of finding and removing errors.
(Found by Developer) (Found by tester)
Error Bug
https://www.youtube.com/channel/UCUhiAuU6nPhGSONtVAa6HMQ
Types of Errors/ Bugs
Invalid
statement
written in code
Error in
execution of
successful
compilation of
code
Poor logics in
Code
Syntax
errors
Syntax
errors
Run
Time
errors
Logical
errors
https://www.youtube.com/channel/UCUhiAuU6n
PhGSONtVAa6HMQ
Syntax of Programming Language
 Set of rules of a programming language for writing
statements of a computer program.
Syntax Errors:
 Occur due to violation of Syntax
(Grammar Rules) of programming language
 Detected before compile time
 Easy to detect and modify
 Program does not execute before correction
https://www.youtube.com/channel/UCUhiAuU6nPhGSO
NtVAa6HMQ
Common Syntax Errors
Most frequently occurring syntax errors include:
 Missing or misplaced Semicolon “;”
 Spelling Mistake
 Missing or extra parenthesis or braces
 Incorrect use of operators, loops or blocks etc
#include<stdio.h>
int main()
{
int length = 5;
int width = 10 Missing Semicolon “;”
int area = length * width + ;
printtf(“Test”);
printf("The area of the rectangle is %dn", area);
return 0;
}
}
Spelling
mistake
Extra brace
Incorrect use of operator
https://www.youtube.com/channel/UCUhiAuU6nPhGSONtVA
a6HMQ
RUN TIME ERROR
 Occur due to performing illegal operations (Divide a
number by zero)
 Occur during program execution (Run time).
 These errors are not hardest to find
 It leads to abnormal termination of the program
 When run time errors occur, the compiler stops the
execution of program and displays error message
https://www.youtube.com/channel/UCUhiAuU6nPhG
SONtVAa6HMQ
Common Run-Time errors
 Dividing a number by zero.
 If input data given to program is not in correct format
or input data file is not found in specified path
#include<stdio.h>
int main()
{
int no = 9, div =0; //Error: number is divided by zero 0,
div = no/0;
printf("The result is %dn", div);
return 0;
}
https://www.youtube.com/channel/UCUhiAuU6n
PhGSONtVAa6HMQ
Logical Errors
 The errors in logic of program are called logical errors.
 These errors are not detected by compiler
 These errors are hardest to find and remove because
 Compiler does not detect these errors
 There is not identification (error message) during
program execution.
https://www.youtube.com/channel/UCUhiAuU6n
PhGSONtVAa6HMQ
Common Logical Errors
Write a program in c language to show the sum of two numbers.
#include<stdio.h>
int main()
{
int a,b,sum;
sum = a-b;
printf("The sum of a and b is %dn", sum);
return 0;
}
This program always produce wrong result because
requirement is sum not subtraction
https://www.youtube.com/channel/UCUhiAuU6n
PhGSONtVAa6HMQ

More Related Content

Similar to Programming Error or Bug.pptx

Passing The Joel Test In The PHP World
Passing The Joel Test In The PHP WorldPassing The Joel Test In The PHP World
Passing The Joel Test In The PHP WorldLorna Mitchell
 
C and its errors
C and its errorsC and its errors
C and its errorsJunaid Raja
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer ProgrammingProf. Erwin Globio
 
Software Bugs A Software Architect Point Of View
Software Bugs    A Software Architect Point Of ViewSoftware Bugs    A Software Architect Point Of View
Software Bugs A Software Architect Point Of ViewShahzad
 
Error Correction Techniques
Error Correction TechniquesError Correction Techniques
Error Correction TechniquesKelly Bauer
 
The Death of Flaky Tests by Dave Haeffner
The Death of Flaky Tests by Dave HaeffnerThe Death of Flaky Tests by Dave Haeffner
The Death of Flaky Tests by Dave HaeffnerSauce Labs
 
Live Source - an Agile Toolkit
Live Source - an Agile ToolkitLive Source - an Agile Toolkit
Live Source - an Agile ToolkitAlline Oliveira
 
programming type error
programming type errorprogramming type error
programming type errorWalepak Ubi
 
Session17-Software Testing.pdf
Session17-Software Testing.pdfSession17-Software Testing.pdf
Session17-Software Testing.pdfPeterTran514407
 
Steps in Implementing a Program.ppsx
Steps in Implementing a Program.ppsxSteps in Implementing a Program.ppsx
Steps in Implementing a Program.ppsxEdison Francis
 
Module 201 2 20 just 20 basic
Module 201   2  20  just 20 basic Module 201   2  20  just 20 basic
Module 201 2 20 just 20 basic Nick Racers
 
Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)LewisB2013
 
Big Java Chapter 1
Big Java Chapter 1Big Java Chapter 1
Big Java Chapter 1Maria Joslin
 

Similar to Programming Error or Bug.pptx (20)

Passing The Joel Test In The PHP World
Passing The Joel Test In The PHP WorldPassing The Joel Test In The PHP World
Passing The Joel Test In The PHP World
 
TYPES OF ERRORS.pptx
TYPES OF ERRORS.pptxTYPES OF ERRORS.pptx
TYPES OF ERRORS.pptx
 
C and its errors
C and its errorsC and its errors
C and its errors
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
Software Bugs A Software Architect Point Of View
Software Bugs    A Software Architect Point Of ViewSoftware Bugs    A Software Architect Point Of View
Software Bugs A Software Architect Point Of View
 
Error Correction Techniques
Error Correction TechniquesError Correction Techniques
Error Correction Techniques
 
Project
ProjectProject
Project
 
The Death of Flaky Tests by Dave Haeffner
The Death of Flaky Tests by Dave HaeffnerThe Death of Flaky Tests by Dave Haeffner
The Death of Flaky Tests by Dave Haeffner
 
Notacd081
Notacd081Notacd081
Notacd081
 
Live Source - an Agile Toolkit
Live Source - an Agile ToolkitLive Source - an Agile Toolkit
Live Source - an Agile Toolkit
 
programming type error
programming type errorprogramming type error
programming type error
 
Notacd08
Notacd08Notacd08
Notacd08
 
Session17-Software Testing.pdf
Session17-Software Testing.pdfSession17-Software Testing.pdf
Session17-Software Testing.pdf
 
Steps in Implementing a Program.ppsx
Steps in Implementing a Program.ppsxSteps in Implementing a Program.ppsx
Steps in Implementing a Program.ppsx
 
SD & D Testing
SD & D TestingSD & D Testing
SD & D Testing
 
Module 1 2 just basic-
Module 1 2  just basic-Module 1 2  just basic-
Module 1 2 just basic-
 
Module 201 2 20 just 20 basic
Module 201   2  20  just 20 basic Module 201   2  20  just 20 basic
Module 201 2 20 just 20 basic
 
Programming part2
Programming part2Programming part2
Programming part2
 
Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)Lewis brady engine terminology (edited version)
Lewis brady engine terminology (edited version)
 
Big Java Chapter 1
Big Java Chapter 1Big Java Chapter 1
Big Java Chapter 1
 

Recently uploaded

DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Recently uploaded (20)

9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

Programming Error or Bug.pptx

  • 1. Programming Errors/ Bugs  Bug  Debugging  Types of Programming Errors / Bugs  Syntax Errors  Run-time Errors  Logical Errors @YouTube: Learn to Lead Computer Science
  • 2. Unexpected output produced by program. Debugging The process of finding and removing errors. (Found by Developer) (Found by tester) Error Bug https://www.youtube.com/channel/UCUhiAuU6nPhGSONtVAa6HMQ
  • 3. Types of Errors/ Bugs Invalid statement written in code Error in execution of successful compilation of code Poor logics in Code Syntax errors Syntax errors Run Time errors Logical errors https://www.youtube.com/channel/UCUhiAuU6n PhGSONtVAa6HMQ
  • 4. Syntax of Programming Language  Set of rules of a programming language for writing statements of a computer program. Syntax Errors:  Occur due to violation of Syntax (Grammar Rules) of programming language  Detected before compile time  Easy to detect and modify  Program does not execute before correction https://www.youtube.com/channel/UCUhiAuU6nPhGSO NtVAa6HMQ
  • 5. Common Syntax Errors Most frequently occurring syntax errors include:  Missing or misplaced Semicolon “;”  Spelling Mistake  Missing or extra parenthesis or braces  Incorrect use of operators, loops or blocks etc #include<stdio.h> int main() { int length = 5; int width = 10 Missing Semicolon “;” int area = length * width + ; printtf(“Test”); printf("The area of the rectangle is %dn", area); return 0; } } Spelling mistake Extra brace Incorrect use of operator https://www.youtube.com/channel/UCUhiAuU6nPhGSONtVA a6HMQ
  • 6. RUN TIME ERROR  Occur due to performing illegal operations (Divide a number by zero)  Occur during program execution (Run time).  These errors are not hardest to find  It leads to abnormal termination of the program  When run time errors occur, the compiler stops the execution of program and displays error message https://www.youtube.com/channel/UCUhiAuU6nPhG SONtVAa6HMQ
  • 7. Common Run-Time errors  Dividing a number by zero.  If input data given to program is not in correct format or input data file is not found in specified path #include<stdio.h> int main() { int no = 9, div =0; //Error: number is divided by zero 0, div = no/0; printf("The result is %dn", div); return 0; } https://www.youtube.com/channel/UCUhiAuU6n PhGSONtVAa6HMQ
  • 8. Logical Errors  The errors in logic of program are called logical errors.  These errors are not detected by compiler  These errors are hardest to find and remove because  Compiler does not detect these errors  There is not identification (error message) during program execution. https://www.youtube.com/channel/UCUhiAuU6n PhGSONtVAa6HMQ
  • 9. Common Logical Errors Write a program in c language to show the sum of two numbers. #include<stdio.h> int main() { int a,b,sum; sum = a-b; printf("The sum of a and b is %dn", sum); return 0; } This program always produce wrong result because requirement is sum not subtraction https://www.youtube.com/channel/UCUhiAuU6n PhGSONtVAa6HMQ