Moody's interview question

some C++ questions