Skip to main contentSkip to solution

Read the following statements related to exception handling and arrange them in the correct order.

A. Exception is raised

B. Executes the exception for catching an exception

C. Program searches for exception handler

D. Create exception object

E. An Error encountered

Solution

✅ Correct Option: 4

E: An error is encountered in the running program.

D: An exception object is created, holding the error type and details.

A: The exception is raised (thrown) with that object.

C: The program searches for an exception handler, moving up the call stack.

B: The matching handler (catch block) executes to catch the exception.


Option 2: the handler search starts only after the exception is raised, so C cannot come before A.

Option 3: the catch block runs only after a handler is found, so B cannot come before C.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question