First find the total length of the string.
For Ex: sukesh.
Here total length of the string will be 6, then copy the last letter based on the last position to another data item.
After that decrease the count by 1 (i.e Total length -1 (6-1=5)), and copy that letter to the other data item where you previously done.
repeat this process unitl zero.