1.

What will happen when we move to try block far away from catch block?(a) Reduces the amount of code in cache(b) Increases the amount of code in cache(c) Don’t alter anything(d) Increases the amount of codeThis question was posed to me by my school teacher while I was bunking the class.The above asked question is from Exceptions and Efficiency in chapter Derived Classes, Templates & Exception Handling in C++ of C++

Answer»

The correct answer is (a) Reduces the amount of code in cache

Explanation: COMPILERS may TRY to move the catch-code FAR AWAY from the try-code, which reduces the amount of code to keep in cache normally, thus enhancing performance.



Discussion

No Comment Found

Related InterviewSolutions