How is exception handling carried out in c++?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is class and object in oops?

835


Why is abstraction used?

841


What is polymorphism used for?

772


How do you achieve runtime polymorphism?

740


What is inheritance write a program to show use of inheritance?

869


what is the drawback of classical methods in oops?

3110


What is encapsulation oop?

794


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

2984


What is solid in oops?

807


class type to basic type conversion

2089


What is difference between oop and pop?

872


Why is polymorphism used?

775


What is basic concept of oop?

897


Why is oop useful?

815


Can enum be null?

764