title: Syntax errors passing array to functions
body: <p>new here to the site, though I have searched through here for answers to questions before. I was wondering if someone could give me a little guidance &amp; help with a program I'm writing. </p>
  
  <p>It is supposed to have a user enter values into an array and perform actions on the array. For some reason though, when using a function to enter/print/manipulate the array, I'm getting syntax errors when i compile the program ( using the command line):</p>
  
  <p>(9): error C2061: identifier 'enterNum'</p>
  
  <p>(9): error C2059: ';'</p>
  
  <p>(9): error C2059: 'type'</p>
  
  <p>(85): error C2061: identifier 'enterNum'</p>
  
  <p>(85): error C2059: ';'</p>
  
  <p>(85): error C2059: 'type'</p>
  
  <p>(85): error C2059: ','</p>
  
  <p>(95): error C2143: missing ')' before 'constant'</p>
  
  <p>(95): error C2143: missing '{' before 'constant'</p>
  
  <p>(95): error C2059: ''</p>
  
  <p>(95): error C2059: ')'</p>
  
  <p>They all seem like simple errors but I don't know what I'm doing wrong. any help would be appreciated. Here is the code from my program that the errors are coming from</p>
  
  <pre><code>#define MAX 100
  int ar[MAX];
  </code></pre>
  
  <p>starting at line 9</p>
  
  <pre><code>array enterNum (int ar[], MAX)
  array printArray (int ar[], MAX)
  void mean( const int ar[],int n)
  void reverseArray( const int ar[], int n)
  </code></pre>
  
  <p>line 85</p>
  
  <pre><code>array enterNum(int ar[], MAX) // Function for entering all elements of array
  {
  size_t i;
  for( i = 0; i &lt; n; i++) // loop to enter values
  {
      printf("ar[%d] = ", i);
      scanf("%d\n", &amp;ar[i]);
  }
   }
  </code></pre>
  
  <p>line 95</p>
  
  <pre><code>void printArray(int ar[], MAX)
  {
  puts("The entered array is:");
  
  for( i = 0; i &lt; n; i++) //prints all elements of the array
      printf("ar[%d] = %d",i, ar[i]);
  }
  </code></pre>