Qtr No. 213, New Town Yehlanka
Indore 454775, India
| Spot the possible errors in the following program Line - 1 class Base { Line - 2 void display(){ Line - 3 cout << "Base class - display"; Line - 4 } Line - 5 }; Line - 6 class Derived : protected Base{ Line - 7 public: Line - 8 void display(){ Line - 9 cout << "Derived class - display"; Line - 10 } Line - 11 }; Line - 12 int main() { Line - 13 Base* b = new Derived; Line - 14 b.display(); Line - 15 return 0; Line - 16 } |
To get all Infosys Certified CPP Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee