Problem of the Day
Friday, October 2, 2026
Problem:
Computer programs often have errors in them. Which of the following is an acceptable debugging strategy for identifying the source of an error in a program?
- Inserting
printlnstatements that print out the values of variables at given checkpoints - Using a debugger in an Integrated Development Environment to analyze the code as it executes
- Going through the code "by hand" one instruction at a time, writing down values for variables and tracking the program's execution
- II only
- I and II only
- II and III only
- I, II, and III
The correct answer is d. All three strategies can be useful in helping understand why a given program might not be working as intended.