Agnity interview question

C++ basics, virtual functions