I\'m totally newbie here. As stated above, I would like to know how to check whether the input string contains combination of uppercase and lowercase. After that print a stateme
Something like this (which will work on both ASCII and EBCDIC platforms):
#include
int hasMixedCase(const char *src)
{
int hasUpper=0, hasLower=0;
for (;*src && !(hasUpper && hasLower);++src)
{
hasUpper = hasUpper || (isalpha(*src) && *src == toupper(*src));
hasLower = hasLower || (isalpha(*src) && *src == tolower(*src));
}
return hasLower && hasUpper;
}