title: How to convert to uppercase in c language
body: <p>I'm writing a code in c language, the function should send the output to main(). Every time I enter string and try to convert it uppercase the message appear "Segmentation fault
  "</p>
  
  <p>here is my code:</p>
  
  <pre><code> char uppercase(char inputt[]);
  </code></pre>
  
  <p>inside the main():</p>
  
  <pre><code>case 'C': case 'c':
  {
  printf ("The string: %s \n", uppercase(inputt));
  
  }
  break;
  </code></pre>
  
  <p>my function:</p>
  
  <pre><code>char uppercase(char inputt[]) {
      int i=0, len[100];
      for(i = 0; inputt[i]; i++) {
          len[i] = toupper(inputt[i]);
      }
      return len[i];
  }
  </code></pre>
  
  <p>Thank you</p>