Exam GPYC All QuestionsBrowse all questions from this exam
Question 11

What happens if a programmer fails to build exception handling into a program, and the program encounters an unexpected error condition?

    Correct Answer: D

    If a programmer fails to build exception handling into a program and the program encounters an unexpected error condition, the application will terminate immediately or after resources are exhausted. Without proper exception handling, the program doesn't have instructions on how to manage the error, causing the interpreter or runtime environment to halt execution and possibly display an error message.

Discussion
mrmrmeOption: D

If python encounters an error that it doesn't know how to handle, it crashes and prints a traceback. Book 5, pg 253

a29dc2cOption: D

D. The application will terminate immediately or after resources are exhausted When a program encounters an unexpected error condition and lacks proper exception handling, it typically results in the program terminating abruptly. The interpreter or runtime environment will halt the execution of the program and may display an error message detailing the cause of the termination. This is because, without exception handling, the program does not have instructions on how to recover from or otherwise deal with the error condition.

matts5150Option: D

it stops and creates a traceback

Tsotsi

Agreed