title: Receive signal SIGTRAP when my text file contain characters over the limit
body: <p>I am new to C and I can't fix this problem. When I write on the text file more than 27 characters I receive signal SIGTRAP. Trace/breakpoint trap.
  I compile with Dev-C++ on Internet cafe computer windows 7. Text file contein: <code>Dinosaurs are a diverse group of animals of the clade Dinosauria</code></p>
  
  <pre><code>int main(int argc, char *argv[]) { 
     FILE *myinput; 
     char **arr, **temp;
     char string[50];
     int i,j,wrd;
  
     arr=NULL;
     temp=NULL;
     i=0;
     myinput = fopen("word.txt", "r");
     while(1)
     {
       wrd = fscanf(myinput, "%s",string);
       if(!(wrd&gt;0))
       {
         break;
       }
       temp=(char **)realloc(arr,i+1);
       arr=temp;
       arr[i]=(char *)malloc(sizeof(char)*(strlen(string)+1));
       strcpy(arr[i],string);
       i++; //counting words in a line from txt file.
     }
     for(j=0;j&lt;i; j++)
     {
      printf("%s ", arr[j]);
     }
     free(arr);
  return 0;   
  }
  </code></pre>