Vidyalelo
C++ Programming · Q122

C++ miscellaneous

Programming · C++ Programming · question 122

Q122

What will be the output of the following C++ code? #include #include using namespace std; int main () try int* myarray = new int[1000]; cout << "allocated"; catch (exception& e) cout << "Standard exception: " << e.what() << endl; return 0;

A.
Allocated
B.
Standard exception
C.
Depends on the memory
Answer
D.
Error

Answer: Option C

Solution

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