How is exception handling carried out in c++?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Why is oop better than procedural?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
where is memory for struct allocated? where is memory for class-object allocated? I replied for struct in stack and for class-object in heap. THen he asked if class has struct member variable what happens.class on heap and what about struct in that class? couldnt ans :( :-?
write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation
1 Answers College School Exams Tests, HCL, IBM, TCS,
How to use CMutex, CSemaphore in VC++ MFC
Where You Can Use Interface in your Project
What is difference between data abstraction and encapsulation?
what is the difference between class to class type conversion and copy constructor ?
What is operator overloading? Give Example
11 Answers CTS, IBM, TCS,
pointers are support in C#? if yes then how to use it?
8 Answers Softvision Solution,
how can we design a magic square in c++?or suggest me the basic idea of it.
what is meant by files?