Apple interview question

C++ questions about string manipulation