Qtr No. 213, New Town Yehlanka
Indore 454775, India
| Consider the below program, in which line, error will be thrown? class Base { public : int x, y; public: Base(int i, int j){ x = i; y = j; } }; class Derived : public Base { public: Derived(int i, int j):x(i), y(j) {} // Line 1 void print() { cout << x <<" "<< y; // Line 2 } }; int main(void){ Derived d(10, 10); // Line 3 d.print(); return 0; } |
To get all Infosys Certified CPP Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee