Object Oriented Programming Using C++ Assignment

plumponionchipsΛογισμικό & κατασκευή λογ/κού

18 Νοε 2013 (πριν από 3 χρόνια και 10 μήνες)

62 εμφανίσεις

Object Oriented Programming Using C++ Assignment

Exception

Handling


Q1)

What is exception handling? Explain try, throw and catch using an example.

Q2)


What are exceptions? What are the differences between synchronous and asynchronous
exceptions?

Q3)


What happens wh
en an exception is raised in a try


block having a few constructed
objects? What is stack unwinding?

Q4)


How does


C++’s throwing

and catching

exceptions differ from C’s setjmp( ) and
longjmp( )?

Q5)


When memory allocation fails, how does the new operator not
ify the error to the caller?

Q6)


When does the function unexpected ( ) is invoked? Write a program which installs the user
defined unexpected function to handle exceptions.

Q7)

Write a program which transfers the control to user defined terminate function when ra
ised
exception is uncaught

Q8)


What are the issues that need to be considered while designing fault tolerant software?

Q9)

Write an interactive program which divided two complex numbers. Overload divide (/)
operator. Handle cases such as division


by

zero using

exceptions.

Q10)


Write a program for matrix multiplication. The matrix multiplication function should notify
if the order of matrix is invalid using exceptions.