title: What is the correct syntax for specifying an array of characters as a function parameter?
body: <p>What is the correct syntax for specifying an array of characters as one of the parameters of a function? </p>
  
  <p>I don't know if I am stressed and unable to find the error or because i have been away from C for a while. I just cannot spot the error. Please help!</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  void reverseWord(int len, char[] str, int index)
  {
      int start, end;
      char temp;
      start = index - len;
      end = index - 1;
      while (start &lt;= end)
      {
          temp = str[start];
          str[start] = str[end];
          str[end] = temp;
          start++;
          end --;
      }
  }
  
  void main()
  {
      int i,j=0, len;
      int tmp = 0;
      char str[]="i am a loser";
      char word[]= " ";
      len = strlen(str);
      for(i=0;i&lt;len;i++)
      { 
          if(str[i] == ' ')
          {
              tmp = strlen(word);
              if(tmp != 0)
              {    
                   reverseWord(tmp , str ,i);
                   j = 0; &lt;&lt;ERROR PRONE LINE&gt;&gt;
              }
          }
         else
             word[j++]=str[i];
      }
  
      printf ("final string = %s",str); 
  }
  </code></pre>
  
  <p>I keep getting this error</p>
  
  <pre><code>error: expected ‘;’, ‘,’ or ‘)’ before ‘str’ on line marked above
  </code></pre>