Qtr No. 213, New Town Yehlanka
Indore 454775, India
| Predict the output for the following program class base { public: base() { cout<<"Constructing base \n"; } ~base() { cout<<"Destructing base \n"; } }; class derived: public base { public: derived() { cout<<"Constructing derived \n"; } ~derived() { cout<<"Destructing derived \n"; } }; int main(void) { base* b = new derived; delete b; return 0; } |
To get all Infosys Certified CPP Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee