I used google with string and toupper, and this was displayed as first hit :-).
I noticed that the C versions of the code are not correct tough, so in order to get it improved for the future I wanted to add some notes.
The main problem I saw is that the ANSI-C tolower is used with a char.
Ansi-C's tolower however only expects unsigned char's or EOF, the actual argument is an int.
For at least some conforming implementations I know, tolower uses its argument as index into an array, and for negative char's (if char happens to be signed, e.g. Win32), this results in a out of bound memory access.
If you want to use a char, you always have to cast it to unsigned char (as ugly as it may look).
char c= tolower((unsigned char)inputCh);
(I also wonder is this (int(*)(int)) cast is really reasonable for the C++ version. I did never notice that casts would resolve ambiguity, but not sure, and of course of topic in a C thread)