for (pch = s1; *pch; ++pch) {
if (isalpha(*pch))
*pch = islower(s1[0]) ? tolower(*pch) : toupper(*pch); // ternary operator
else if (isdigit(*pch)) {
while (isdigit(*pch) && isalpha(*pch++))
pch++;
}
7ello, World!!111oneONEone
7ello, world!!111oneoneone
7eLLO, WORLD!!111oNEONEONE
char *pch;
for (pch = s1; *pch; pch++) {
if (isalpha(*pch)) {
if (isupper(s1[0]))
*pch = toupper(*pch);
else
*pch = tolower(*pch) ;
}
else continue;
}