Exception Handling - C++ (MCQ) questions and answers
Here, you can read Exception Handling multiple choice questions and answers with explanation.
1) Irrespective of exception occurrence, catch handler will always get executed. - Published on 19 Oct 15
a. True
b. False
Answer
Explanation
|
ANSWER: False
Explanation: No explanation is available for this question!
|
|
2) An exception can be of only built-In type. - Published on 19 Oct 15
a. True
b. False
Answer
Explanation
|
ANSWER: False
Explanation: No explanation is available for this question!
|
|
3) Generic catch handler must be placed at the end of all the catch handlers. - Published on 19 Oct 15
a. True
b. False
Answer
Explanation
|
ANSWER: True
Explanation: No explanation is available for this question!
|
|
4) Generic catch handler is represented by ______________ . - Published on 19 Oct 15
a. catch(..,)
b. catch(---)
c. catch(…)
d. catch( void x)
Answer
Explanation
|
ANSWER: catch(…)
Explanation: No explanation is available for this question!
|
|
5) If inner catch handler is not able to handle the exception then__________ . - Published on 19 Oct 15
a. Compiler will look for outer try handler
b. Program terminates abnormally
c. Compiler will check for appropriate catch handler of outer try block
d. None of these
Answer
Explanation
|
ANSWER: Compiler will check for appropriate catch handler of outer try block
Explanation: No explanation is available for this question!
|
|
6) Functions called from within a try block may also throw exception. - Published on 19 Oct 15
a. True
b. False
Answer
Explanation
|
ANSWER: True
Explanation: No explanation is available for this question!
|
|
7) We can prevent a function from throwing any exceptions. - Published on 19 Oct 15
a. True
b. False
Answer
Explanation
|
ANSWER: True
Explanation: No explanation is available for this question!
|
|
8) In nested try blocks, there is no need to specify catch handler for inner try block. Outer catch handler is sufficient for the program. - Published on 19 Jul 15
a. True
b. False
Answer
Explanation
|
ANSWER: False
Explanation: No explanation is available for this question!
|
|
9) A try block can be nested under another try block. - Published on 19 Jul 15
a. True
b. False
Answer
Explanation
|
ANSWER: True
Explanation: No explanation is available for this question!
|
|
10) How can we restrict a function to throw certain exceptions? - Published on 19 Jul 15
a. Defining multiple try and catch block inside a function
b. Defining generic function within try block
c. Defining function with throw clause
d. It is not possible in CPP to restrict a function
Answer
Explanation
|
ANSWER: Defining function with throw clause
Explanation: No explanation is available for this question!
|
|