Pregunta de entrevista de Yahoo

What are virtual constructors in C++ ?

Respuestas de entrevistas

Anónimo

15 abr 2011

There is no such thing as virtual constructors.

Anónimo

11 oct 2011

There are virtual destructors but no virtual constructors. The reason for having a virtual destructor is to have proper clean up of derived class object. We do not have virtual constructors because the base class does not know about derived class existence when it gets called and hence does not make sense to have constructors virtual.

Anónimo

4 feb 2021

It's essential to demonstrate that you can really go deep... there are plenty of followup questions and (sometimes tangential) angles to explore. There's a lot of QA Engineer experts who've worked at Yahoo, who provide this sort of practice through mock interviews. There's a whole list of them curated on Prepfully. prepfully.com/practice-interviews