1.

Which of the following is best to include under try block?(a) static values(b) const values(c) dynamic allocations(d) default valuesThis question was addressed to me during an interview.This is a very interesting question from Standard Exceptions topic in section Derived Classes, Templates & Exception Handling in C++ of C++

Answer»

The correct OPTION is (c) dynamic allocations

To explain I WOULD say: Because the dynamic allocations can change at any TIME, So it is best to include in try block.



Discussion

No Comment Found

Related InterviewSolutions