What will be the output of the following C++ code? [code] #include <iostream> #include <exception> using namespace std;

What will be the output of the following C++ code?
Code:
    #include <iostream>
    #include <exception>
    using namespace std;
    int main () 
    {
        try
        {
            double* i= new double[1000];
            cout << "Memory allocated";
        }
        catch (exception&#038; e)
        {
            cout << "Exception arised: " << e.what() << endl;
        }
        return 0;
    }
A. Memory allocated
B. Exception arised
C. Depends on the computer memory
D. Memory allocatedException arised
 

Tìm kiếm

Back
Top