GIAC Python Coder (GPYC) — Question 5
What happens if a programmer fails to build exception handling into a program, and the program encounters an unexpected error condition?
Answer options
- A. The interpreter will ignore the error and move to the next line.
- B. The application will print a warning to the console and continue to the end
- C. The computer will ג€fuzzג€ input until it finds one that generates no error
- D. The application will terminate immediately or after resources are exhausted
Correct answer: D
Explanation
The correct answer is D because without exception handling, the application is likely to crash when it encounters an unexpected error. Options A and B incorrectly suggest that the program can continue running despite errors, and option C does not accurately describe standard error handling behavior.