Jump to

v07-l2-findOutput

What is the output of the following code ?

#include <iostream>

using std::string, std::endl, std::cout;
int main() {
    try{
        string s = "Error!!";
        throw s;
    }
    catch(char* e) {
        cout << e << endl;
    }
    catch(string e) {
        cout << "Hello World" << endl;
    }
    catch(...) {
        cout << "ABC" << endl;
    }
}

???