catch(exception &e)
{
. . .
}
Referring to the sample code above, which one of the
following lines of code produces a written description of
the type of exception that "e" refers to?
a) cout << e.type();
b) cout << e.name();
c) cout << typeid(e).name();
d) cout << e.what();
e) cout << e;

Answer Posted / guest

cout<<typeid(e).name() is the correct one

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to use a new for the reallocation of pointers ?

595


What is a sequence in c++?

574


What is malloc in c++?

555


Can a program run without main?

625


What is the limitation of cin while taking input for character array?

1453






Define token in c++.

712


What is the meaning of string in c++?

568


Is c++ built on c?

559


State the difference between delete and delete[].

577


What is the c++ programming language used for?

579


How can virtual functions in c++ be implemented?

608


Is c++ platform dependent?

629


Discussion on error handling of C++ .

644


Which programming language should I learn first?

574


What is ios :: in in c++?

631