3 ms·
IMHO the more interesting oddity about the functions declared in <ctype.h> is that they work with unsigned char, which means that they have undefined behavior i
by _kst_ 5y ago
IMHO the more interesting oddity about the functions declared in <ctype.h> is that they work with unsigned char, which means that they have undefined behavior if you pass a negative char value (other than EOF, which is typically -1).
This means that if you have a char value (say, an element of a string), you need to cast it to unsigned char before passing it to any of the is*() functions.