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
What are advantages of c++?
What is a storage class?
Define basic type of variable used for a different condition in C++?
What is the difference between the functions rand(), random(), srand() and randomize()?
Difference between declaration and definition of a variable.
What is virtual function? Explain with an example
What is the use of endl?
What are exceptions c++?
What is a pointer with example?
Is std :: string immutable?
What is function declaration in c++ with example?
What is an operator function? Describe the function of an operator function?
Comment on assignment operator in c++.
What is ifstream c++?
Who discovered c++?