title: 2D array print error
body: <p>This is my code snippet:</p>
  
  <pre><code>float *fittedLine[NO_OF_INTERVALS];
  int i;
  for(k=0;k&lt;NO_OF_INTERVALS;k++){
      fittedLine[k] = plotLines(tStart, tEnd, yStart, yEnd);
      for(i=0;i&lt;14;i++)
          printf("%f\n", fittedLine[k][i]);
  }
  </code></pre>
  
  <p>My problem: The print statement is not giving proper outputs; Garbage values are printed.</p>
  
  <p>I tried debugging by putting a breakpoint in line 5 and tried printing 
  fittedLine[0][0], fittedLine[0][1] and so on.
  <strong>That gives proper output</strong>. But when coming to the print statement, things start to fall apart. What is happening here? plotLines returns a 1D array.</p>
  
  <p>plotLines function:</p>
  
  <pre><code>float * plotLines(float t0, float tf, float y0, float yf){
      float m = (yf - y0)/(tf - t0);
      float t = t0;
      int i = 0;
      float y[200];
      while(t&lt;tf){
          y[i] = m*t + yf - m*tf; ///y - y1 = m(x - x1)
          i++;
          t = t+SAMPLINGTIME;
      }
      return y;
  </code></pre>
  
  <p>}</p>