SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Similar a 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 a 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
 

Último

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
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
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
 
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
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Último (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
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
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
 
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
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

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