+ 1
Guess the output. ( Challange)
With full explanation about how the code works including its geometry. https://code.sololearn.com/cR6gUidbrNhp/?ref=app
1 Respuesta
0
Answer should CB. In the code you wrote fun as virtual.
A *a = new C;
A *b = new B;
a->fun(); //print C
b->fun(); //print B