Yandex interview question

reverse a string on c++