C++ Exception Handling Question:
Download Questions PDF

Which of the following statements are true about Catch handler?

1. It must be placed immediately after try block T
2. It can have multiple parameters
3. There must be only one catch handler for every try block
4. There can be multiple catch handler for a try block T
5. Generic catch handler can be placed anywhere after try block.

a. Only 1, 4, 5
b. Only 1, 2, 3
c. Only 1, 4
d. Only 1, 2

Answer:

c. Only 1, 4

Download C++ Exception Handling Interview Questions And Answers PDF

Previous QuestionNext Question
A try block can be nested under another try block -

a. Yes
b. No
In nested try blocks, there is no need to specify catch handler for inner try block. Outer catch handler is sufficient for the program.

a. True
b. False