Continental interview question

C++