Pergunta de entrevista da empresa Yahoo

What are virtual constructors in C++ ?

Respostas da entrevista

Sigiloso

15 de abr. de 2011

There is no such thing as virtual constructors.

Sigiloso

11 de out. de 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.

Sigiloso

4 de fev. de 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