C语言 把字符串s中所有小写字母转换为大写字母,其他字符不变

在 C 语言中,可以使用以下方法来将字符串 s 中的所有小写字母转换为大写字母: #include #include int main() {char s

在 C 语言中,可以使用以下方法来将字符串 s 中的所有小写字母转换为大写字母:

#include 
#include int main() {char s[] = "Hello, World!";int i;for (i = 0; s[i] != '\0'; i++) {if (islower(s[i])) {