How is exception handling carried out in c++?

Answers were Sorted based on User's Feedback



How is exception handling carried out in c++?..

Answer / rajesh manem

Using try and Catch blocks the exceptions are handling C++.
We can write our own defined class and we can handle the
exception.Using throw it will throw the exception t the
calling method/class. The throws keyword is used to tell
this method may throw these type of exceptions.We can throw
any exception what ever you like including class objects.

Is This Answer Correct ?    10 Yes 1 No

How is exception handling carried out in c++?..

Answer / debika mohapatra

EXCEPTION handling was not part of the origin c++.it is a
new feature added to ANSI c++.today,almost all compilers
support this feature.

Is This Answer Correct ?    7 Yes 5 No

How is exception handling carried out in c++?..

Answer / achal ubbott

Exception handling is not a must of programming. But it is
a cleaner way of getting signal if something goes wrong in
the code. Prior to exceptions people used return values of
functions for reporting errors to application using the
classes inside libraries. The application would call some
function(defined inside class) from within try bock. Now if
something goes wrong then the function(defined inside the
class) would throw an exception. This exception is then
handled by catch block in the application.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

how do u initialize the constant variables

5 Answers   IBM, Siemens,


what is object slicing

3 Answers   TCS,


Why static Function is used in C++?

4 Answers   TCS,


what is static?

4 Answers  


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

0 Answers  






What is persistence in oop?

0 Answers  


What normal C constructs work differently in C++?

2 Answers  


why the argument is passed by reference to a copy constructor?example?

2 Answers  


i have to create a view in SQL as like in ORACLE DATA EXPRESS EDITION

2 Answers   CTS,


In which Scenario you will go for Interface or Abstract Class?

1 Answers   InfoAxon Technologies,


Which is the parameter that is added to every non-static member function when it is called?

3 Answers   Accenture,


write a programe to calculate the simple intrest and compund intrest using by function overlading

0 Answers  


Categories