Examveda

Which statement about the 'finally' block in C++ exception handling is true?

A. It must always be followed by a 'catch' block

B. It must always be followed by a 'try' block

C. It is executed regardless of whether an exception is thrown or not

D. It is optional and can be omitted

Answer: Option C


Join The Discussion

Related Questions on Exception Handling in C plus plus

What is exception handling in C++?

A. A method to handle errors during runtime

B. A method to handle errors during compile time

C. A method to handle errors during linking

D. A method to handle errors during execution