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

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 

Recently uploaded (20)

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
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
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.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