Cognex Interview Question

How would you reverse a string in place in C or C++