toupper function
问题 I am wondering how the toupper() function in C works. I am trying it out in the code below but I'm definitely doing something wrong. The code compiles, but the arguments passed into toupper() are not being capitalized... char **copyArgs(int argc, char **argv) { char **a = malloc(sizeof(char *) * (argc)); int i; for(i = 0; i < argc; i++) { int size = strlen(argv[i]); a[i] = malloc(sizeof(char) * (size + 1)); strcpy(a[i], argv[i]); a[i] = toupper(a[i]); } return a; } If I test this with "one