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

What is the last index number in an array of 100 characters a) 100 b) 99 c) 101

592


What is public, protected, private in c++?

657


Is c++ a difficult language?

579


Is python better than c++?

590


Can we inherit constructor in c++?

593






What is the benefit of c++?

605


Define a nested class. Explain how it can be useful.

640


What is the size of a vector?

583


What is an operator function? Describe the function of an operator function?

621


What is the difference between global variables and static varables?

575


What is c++ mutable?

708


How much do coding jobs pay?

555


Does c++ support multilevel and multiple inheritances?

552


How do you traverse a btree in backward in-order?

628


Is c++ the best programming language?

543