Problem Solving with C++ (10th Edition)
Problem Solving with C++ (10th Edition)
10th Edition
ISBN: 9780134448282
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
Question
Book Icon
Chapter 1.4, Problem 23STE
Program Plan Intro

Programming mistakes:

  • A fault in a program denotes a bug and process of elimination of bugs is termed as debugging.
  • A bug denotes an error, failure or fault in a program that may generate improper result.
  • The process of fixing bugs is termed as debugging.
  • Some of computer systems are able to deter, detect or auto correct different computer bugs during operations.
  • The bugs arise from errors made in source code of program.
  • The bugs can cause program to freeze computer in terms of processing.

Types of program errors:

  • The three main types of program error includes:
    • Syntax errors:
      • The compiler catches certain mistakes and denotes an error message.
      • It denotes violation of syntax of programming language.
      • The compiler issues an error message if syntax is been violated.
      • The compiler sometimes raises a warning message while any unusual programming practices.
    • Run-time errors:
      • It denotes type of error that system detects when a program is run.
      • The system may detect certain run-time errors and displays appropriate error message.
      • It may be an issue with numeric calculations.
    • Logic error:
      • It denotes a mistake in underlying algorithm.
      • It may be an issue while translation of algorithm to program code.
      • It denotes that there is no error in syntax while the result obtained is not as expected by user.
      • These types of errors could be corrected by careful examination of algorithm and translation.

Blurred answer
Students have asked these similar questions
What kinds of errors need debugging efforts?
Please explain testability and summarise the compiler.
Explain the compiler's structure and how the code may be tested.

Chapter 1 Solutions

Problem Solving with C++ (10th Edition)