That's one of the greatest mysteries of the universe. No, but it does require a somewhat lengthy explanation.

First of all, toupper() is a C function, so it was invented and implemented in C. Believe it or not, in C, character constants like 'A' are actually int values, unlike in C++ where they are chars. Also, if there is no prototype for a function (i.e., you forgot to include <stdio.h>/<cstdio>), all char arguments are automatically cast to int, and int return value is assumed. Lastly, several values such as EOF that one might pass to toupper() are in fact int values, and if you tried to squeeze them into a char you might get unexpected results. (I can elaborate on that if you like but I think this is in-depth enough. )