reverse words in string without using <string.h> OK