There are two problems in your code:
printf("%s", ...)
is meant for outputting strings (char*
andconst char*
), not single characters. Useprintf("%c", ...)
- You forgot to
#include <ctype.h>
Side-note: You don't have to check if a character is uppercase with isupper(x)
. tolower(x)
will leave already-lowercase characters intact.