Testing and Debugging

Testing and Debugging

Testing involves finding problems in the code. What does one Test for?

Compilation Errors.

Syntax errors: The compiler cannot understand user’s program because it does not follow the syntax.

Common syntax errors are:

  • Missing or misplaced; or}
  • Missing return type for a procedure.
  • Missing or duplicate variable declarations.

Type errors

  • These errors include type mismatch when the user assign a value to a variable and type mismatch between actual and formal parameters.

Runtime Errors

  • Output errors: These errors result when the program runs but produces an incorrect result.
  • An output error indicates an error in the meaning or logic of the program.
  • Exceptions: These errors occur when the program terminates abnormally.
  • Examples include division by zero and out of memory. Exceptions indicate an error in the semantics or the logic of a program.

Nontermination errors

  • These errors occur when the program does not terminate as expected, but continues running endlessly.
  • Debugging consists of isolating and fixing the problems.
  • Testing and debugging are necessary stages in the development cycle, and they are best incorporated early in the cycle.
  • Thoroughly testing and debugging individual components makes testing and debugging integrated applications much easier.

What is Documentation?

Documentation of a program consists of written description of program′s specification, its design, coding, operating procedures etc.

Documentation is either incomplete or inaccurate, making the users and maintenance programmers irritated and annoyed over it.

Documentation can be broadly classified into two types:

  • Documentation for users.
  • Documentation for maintenance programs.

The written text and comments that make a program easier for others to understand use and modify.

The compiler in the compilation process ignores comments.

It provides information about the steps and procedures.

Qus. 1 : Which type of errors flagged by compilers

  1. Logical errors
  2. Syntax errors
  3. Both Logical and Syntax errors
  4. None of these
Qus. 2 : The error that can be pointed out by the compiler are

  1. Syntax errors
  2. Semantic errors
  3. logical errors
  4. None of the above
Qus. 3 : If we overcome the rules of the programming language, we get

  1. Runtime error
  2. Syntax error
  3. logical error
  4. None of the above.
Qus. 4 : Correcting the program code:

  1. Testing
  2. Syntax error
  3. Runtime error
  4. Debugging
Qus. 5 : The process of finding errors in code is called as

  1. Compiling
  2. Running
  3. Testing
  4. Debugging
Qus. 6 : Testing is known as

  1. A stage of all projects
  2. Finding broken code
  3. Evaluating deliverable to find errors
  4. None of the above
Qus. 7 : Debugging is used to:

  1. Find errors from the program
  2. Check the functionality of the program
  3. Black box testing
  4. All of the above
Qus. 8 : The meaning of bug is a-

  1. difficult syntax error in a program
  2. logical error in a programm
  3. Both a and b
  4. All of the above
Qus. 9 : The errors that can be pointed out by the complier are..

  1. Semantic errors
  2. Syntax errors
  3. Logical errors
  4. All of the above


CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad