What is the main purpose of debugging a C++ program?

Options

  • A. To increase the size of the source file
  • B. To convert source code into HTML
  • C. To identify and correct program defects
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

C. To identify and correct program defects

Detailed Explanation

Correct Answer: C — To identify and correct program defects.

Explanation: Debugging involves finding, analyzing and fixing defects in software. Debuggers commonly provide breakpoints, step execution, variable inspection and call-stack views.