title: toupper function
body: <p>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...</p>
  
  <pre><code>char **copyArgs(int argc, char **argv) {
      char **a = malloc(sizeof(char *) * (argc));
  
      int i;
      for(i = 0; i &lt; 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;
  }
  </code></pre>
  
  <p>If I test this with "one two" it results in "one two", not "ONE TWO". Any advice is appreciated.</p>