Predict the output for the following program. class Base {}; class Derived:public Base {}; int main() { Base *bp = new Derived; Derived *dp = new Base; }

No output
Compiler Error in line “Derived *dp = new Base;”
Compiler Error in line “Base *bp = new Derived;”
Runtime Error
Verified Answer
Correct Option - b

To get all Infosys Certified CPP Programmer Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram