Microsoft interview question

Tradition String Manipulation Question. But you need to use C++.