title: Stack smashing error detected by not declaring array properly
body: <p>I'm unable to resolve this error,please help me where i'm wrong, also please tell me how to use the GNU debugger because when i'm using it, "1.c is not an executable file" error occurs.</p>
  
  <p>Here's the ADT file of my code :- <a href="https://drive.google.com/open?id=0B7LawZAwfUJUT2NnSlZ2OFp5ZXc" rel="nofollow noreferrer">Sparse.c</a></p>
  
  <p>Here's my code:-</p>
  
  <pre><code>char filename[4];
  int i,j,vectorCount=0;
  refFile=fopen("x3.txt","r");
  for(i=0; i&lt;=100; i++){
      fscanf(refFile,"%f",&amp;x[i].value);
      x[i].row=i;
      x[i].col=1;
  }
  for(i=1; i&lt;=10; i++){
      sprintf(filename,"data/y%d.txt",i);
      FILE *fptr=fopen(filename,"r");
      y=newSparse(100,1,0);
      for(j=0; j&lt;100; j++){
          fscanf(fptr,"%f",&amp;y[j].value);
          y[j].row=j+1;
          y[j].col=1;
      }
      if(classCheck(x, y)==1){
          vectorCount++;
      }
  }
  </code></pre>