How should runtime errors be handled in c++?



How should runtime errors be handled in c++?..

Answer / Vivek Khodlan

Runtime errors in C++ can be handled using exception handling. This involves creating custom or standard exceptions and throwing them when an error occurs. The code that catches the exception handles the error and determines what action to take next. Standard exceptions in C++ are derived from the std::exception class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Define a conversion constructor?

1 Answers  


What is the error in the code below and how should it be corrected?

1 Answers  


Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?

1 Answers  


Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.

1 Answers  


What do c++ programmers do?

1 Answers  


What is a character in c++?

1 Answers  


Can we get the value of ios format flags?

1 Answers  


Is there anything you can do in C++ that you cannot do in C?

1 Answers  


What is a c++ object?

1 Answers  


how many trys can we write in one class

3 Answers   Cap Gemini,


Define precondition and post-condition to a member function?

1 Answers  


difference between the c++ and c languages

4 Answers   Wipro,


Categories