title: Passing an array of integers as function parameter in C
body: <p>Please help me, i'm stuck at this.
  I have a function which must sum two arrays of integers of size n
  and i must pass as arguments for the function the first element of each array
  Is this enven close? </p>
  
  <pre><code> 12 void sumVect(int * v[], int * w[] ,int n)
   13 //adds the second vector to the first vector; the vectors v and w have exactly n components
   14 {
   15         int i;
   16         for(i=0;i&lt;n;i++)
   17         {
   18                 *v[i]+=*w[i];
   19         }
   20 
   21 }
  </code></pre>
  
  <p>I will give you the whole code</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void sumVect(int * v[], int * w[] ,int n)
  //adds the second vector to the first vector; the vectors v and w have exactly n components
  {
      int i;
      for(i=0;i&lt;n;i++)
      {
          *v[i]+=*w[i];
      }
  
  }
  
  
  int main()
  {   
      int i,j;
      int n = 4;  //the size of a vector
      int k = 5;  //the number of vectors
      int v[k][n];    //the vector of vectors
  
      printf("How many vectors? k=");
      scanf("%d",&amp;k);
  
      printf("How many components for each vector? n=");
      scanf("%d",&amp;n);
  
      for(i=1;i&lt;=k;i++)   //read the content of each vector from the screen
      {
          printf("\nv%d   |\n_____|\n",i);
  
          for(j=0;j&lt;n;j++)
          {
              printf("v%d[%d]=",i,j);
              scanf("%d", &amp;v[i][j]);
          }
      }
  
      for(j=1;j&lt;k;j++)
      {
          sumVect(&amp;v[j], &amp;v[j+1], n);
          for(i=0;i&lt;n;i++)
          {
              printf("%d",v[j][i]);
          }
      }
  
  
      return 0;
  }
  </code></pre>