Vidyalelo
C++ Programming · Q805

C++ miscellaneous

Programming · C++ Programming · question 805

Q805

What will be the output of the following C++ code? #include using namespace std; void empty() throw() cout << "In empty()"; void with_type() throw(int) cout << "Will throw an int"; throw(1); int main() try empty(); with_type(); catch (int) cout << "Caught an int";

A.
In empty()
B.
Will throw an int
C.
Caught an int
D.
All of the mentioned
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board