C++ Exception Handling Question:
Download Questions PDF

How can we restrict a function to throw certain exceptions?

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

C++ Exception Handling Interview Question
C++ Exception Handling Interview Question

Answer:

c. Defining function with throw clause

Download C++ Exception Handling Interview Questions And Answers PDF

Previous QuestionNext Question
We can prevent a function from throwing any exceptions.

a. True
b. False
Return type of uncaught_exception() is________________.

a. int
b. bool
c. char *
d. double