1.

Identify the correct statement about throw(type).(a) A function can throw any type of exceptions(b) A function can throw an exception of certain type only(c) A function can’t throw any type of exception(d) A function can catch all types of exceptionsThe question was asked during an interview.I want to ask this question from Exception Specifications topic in portion Derived Classes, Templates & Exception Handling in C++ of C++

Answer» RIGHT option is (B) A FUNCTION can throw an exception of CERTAIN type only

Explanation: A function can throw an exception of certain type only.


Discussion

No Comment Found

Related InterviewSolutions