1.

What are the disadvantages if use return keyword to return error codes?(a) You have to handle all exceptional cases explicitly(b) Your code size increases dramatically(c) The code becomes more difficult to read(d) All of the mentionedThe question was posed to me in unit test.Question is from Error Handling Alternatives topic in division Derived Classes, Templates & Exception Handling in C++ of C++

Answer»

Right option is (d) All of the mentioned

To explain: As we are using return for each and every EXCEPTION, It will DEFINITELY INCREASE the code SIZE.



Discussion

No Comment Found

Related InterviewSolutions