Q783
What will be the output of the following C++ code? #include #include #include using namespace std; int main( ) try string strg1("Test"); string strg2("ing"); strg1.append(strg2, 4, 2); cout << strg1 << endl; catch (exception &e) cout << "Caught: " << e.what() << endl; cout << "Type: " << typeid(e).name() << endl; ; return 0;
A.
out of range
AnswerB.
bad type_id
C.
bad allocation
D.
bad typ
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board