c string reverse and anagram