L3Harris interview question

Write a function to reverse a string in C++ without allocating extra memory