title: Understanding the syntax *y[ ] passed as parameter
body: <p>I am trying to understand <code>C</code> code and I have stumbled across the following function definitions:</p>
  <pre><code>int foo(int n, double *y[]);
  </code></pre>
  <p>I am having trouble understanding how to handle and interpret <code>*y[]</code>. This syntax is being used in several functions but handled differently. In this example, <code>foo1()</code> it is used as a bidimensional array:</p>
  <pre><code>int foo1(int n, double *y[]){
   double var0 = 0;
   double var1 = 0;
   for (i = 0; i &lt; n; i++) {
      var1 += y[i][1] ;
      var0 += y[i][0] ;
   }
   // do stuff
   return 0;
  }
  </code></pre>
  <p>And here the same syntax is used, but <code>*y[]</code> is used as an array, but here they use the pointer <code>*</code> notation:</p>
  <pre><code>int foo2(int n, double *y[]){
   double var0 = 0;
   for (i = 0; i &lt; n; i++) {
      var0 += *y[i] ;
   }
   // do stuff
   return 0;
  }
  </code></pre>
  <p>Could you be so kind to provide a precise explanation of what <code>*y[]</code> means and why it can be used so flexibly as a function parameter?</p>