Use isalpha() to detect letters, and use the previous printf() instead of putchar() to display the next character after a word.