Vidyalelo
C++ Programming · Q29

Exception Handling in C++

Programming · C++ Programming · question 29

Q29

How do you handle exceptions thrown from constructor initialization lists in C++?

A.
Using try-catch blocks inside the constructor
B.
Using try-catch blocks outside the constructor
Answer
C.
Using the 'noexcept' specifier
D.
Exceptions from constructor initialization lists cannot be caught

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board