Anonymous interview question

Reverse a string in cpp