Vidyalelo
C++ Programming · Q750

C++ miscellaneous

Programming · C++ Programming · question 750

Q750

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

A.
Memory allocated
B.
Exception arised
C.
Depends on the computer memory
Answer
D.
Memory allocatedException arised

Answer: Option C

Solution

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