我希望字母“ i”显示为大写。我试图将“ i”传递给另一个字符,但仍然无法正常工作。
#include<stdio.h>
#include<string.h>
int main()
{
char str[6] = "modify";
char maj = str[4];
printf("%c\n", strupr (maj));
}
最佳答案
没有strupr
。您需要toupper()
代替,而这需要#include<ctype.h>
关于c - 大写c中的字符,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41655881/