classic string reversal in c