Morgan Stanley Interview Question

Basically c/c++ and some puzzles .