Question: Q 2 . Multiple choices ( 5 points * 2 questions = 1 0 points in total ) . Choose one and only one which

Q2. Multiple choices (5 points *2 questions =10 points in total).
Choose one and only one which is not true, or you think the least close to correct.
(1) Choose one and only one which is not true, or you think the least close to correct.
a) The system will automatically detect and raise a system defined exception no matter with or without name, once it occurs in a program,
b) All the system defined exceptions have a message.
c) All the system defined exceptions have a code (number).
d) The system will not detect any programmer defined exceptions.
e) Once the system defined an internal exception with a name, then the system will not automatically detect and raise this error.
(2) In this question 2, we assume the outer block has a nested inner block,
a) The exception names declared in the outer block are global to all its sub blocks, that means, all the sub (inner) blocks can reference these exception names.
b) When an error occurs in the inner block, and this error is handled by exception section in the inner block, then the next statement to be executed will be the statement in the outer block that is right after this inner block. Just as there is no error happened in the inner block.
c) When an error occurs in the inner block, and this error is not handled by the inner block, then the next statement to be executed will be the statements in the EXCEPTION section in the outer block.
d) If an exception occurs in the declarative section in the inner block, then the control will be passed to the Exception section in that inner block; if there is a right handler, it will be handled inside the inner block.
e) When an error occurs in the outer block, and this error is not handled by the outer block, then the program ends in error.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!