Morgan Stanley interview question

Basically c/c++ and some puzzles .