#include <stdio> int main(void) { int i=0; char string[100]; strcpy(string,"abcdefghijklmnopqrstuvwxyz"); while (string[i]!='\0'){ //将小写转化成大写 if (islower(string[i])) string[i]=toupper(string[i]); i++; } printf("%s\n",string); return 0; }deepfuture@deepfuture-laptop:~/private/mytest$ ./test15
ABCDEFGHIJKLMNOPQRSTUVWXYZ