Write the C++ code to reverse the sequence of characters in the second h

Write the C++ code to reverse the sequence of characters in the second half of it.
Ex:
S1="abcdef"
Output="abcfed"