Microsoft Interview Question

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