1.

Which alternative can replace the throw statement?(a) for(b) break(c) return(d) exitThis question was addressed to me during an interview.Asked question is from Error Handling Alternatives in section Derived Classes, Templates & Exception Handling in C++ of C++

Answer»

Right OPTION is (c) RETURN

Easiest EXPLANATION - throw and return does the same job as return a VALUE. So it can be replaced.



Discussion

No Comment Found

Related InterviewSolutions