title: error - subscripted value is neither array nor pointer nor vector
body: <p>I'm having a problem in reversing a string using a function. Here is my code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  int str_length(char lang);
  
  int main()
  {
      char language[100];
  
      int string_length;
  
      while(1==scanf("%[^\n]", language))
      {
          string_length=str_length(language);
      }
  
      int i;
  
      for(i=string_length; i&gt;=0; i--)
      {
          printf("%c\n", language[i]);
      }
  
      return 0;
  }
  
  int str_length(char lang)
  {
      int i;
  
      for(i=0; lang[i]!='\0'; i++)
      {
          i++;
      }
  
      return i;
  }
  </code></pre>
  
  <p>The error which is same as the title shows in the line 'for(i=0; lang[i]!='\0'; i++)'. </p>
  
  <p>Please help me to understand the problem.</p>