ある本の解答例ですが実行すると先頭文字が消えます。これではダメなんでしょうか?
void str_toupper(char *str)
{
while (*str)
*str++ = toupper(*str);
}