C++ Exception handling concepts interview

C++ exception handling interview questions and answers for freshers and experienced candidates. These interview questions and answers on C++ exception handling will help you strengthen your technical skills, prepare for the interviews and quickly revise the concepts. Many candidates appear for the interview for one role - many of the them give the right answers to the questions asked. The one who provides the best answer with a perfect presentation is the one who wins the interview race. The set of C++ exception handling interview questions here ensures that you offer a perfect answer to the interview questions posed to you.
          

C++ Exception handling concepts interview

 

<<Previous  Next>>

Explain how we implement exception handling in C++.

Latest answer: Exception handling in C++ is implemented by using the try{} and catch(){} statements.

When a try block throws an exception, the program leaves the try block and enters the catch statement of the catch block..................
Read answer

Explain terminate() and unexpected() function.

Latest answer: terminate() is a library function which by default aborts the program
It is called whenever the exception handling mechanism cannot find a handler for a thrown exception...................
Read answer

Describe Exception handling concept with an example.

Latest answer: Exceptions: Exceptions are certain disastrous error conditions that occur during the execution of a program. They could be errors that cause the programs to fail or certain conditions that lead to errors. If these run time errors are not handled by the program, OS handles them and program terminates..................
Read answer

Illustrate Rethrowing exceptions with an example.

Latest answer: Rethrowing an expression from within an exception handler can be done by calling throw, by itself, with no exception. This causes current exception to be passed on to an outer try/catch sequence.....................
Read answer

<<Previous  Next>>

Write your comment - Share Knowledge and Experience


 
Interview questions
 
Home | Want a Job? Submit Key Skills | Employer login | My key skills | About us | Sitemap | Contact us