title: i want to print a string array in reverse in c but its giving me an error
body: <p>I don't know why I am getting an error, I want to print the array in reverse, for exmaple if I entered <code>hello</code>, it would print <code>olleh</code> </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #define S 25
  void reverse(char a[S]){
  for(int i=S-1;i&gt;=0;i--){
          printf("the inverse is : %c\n",a[S]);
      }
  }
  
  int main()
  {
  char mystring[S];
  printf("input your string:\n");
  for(int i=0;i&lt;S;i++){
  scanf("%c",&amp;mystring[S]);}
  reverse(mystring[S]);
  
  
  return 0;
  }
  </code></pre>