title: Open file in different position cause different result
body: <p>The test1.c: </p>
  
  <pre><code>int main(int argc, char *argv[])
      {
          FILE* fp = fopen("test.txt","rw");
          int n,m,q;
          scanf(" %d%d%d",&amp;n,&amp;m,&amp;q);
          struct test_t test;
          while (fscanf(fp,"%d%s%d%d%d%d%d%d%d%*d",&amp;test.line,test.data,&amp;test.number[0],&amp;test.number[1],&amp;test.number[2],&amp;test.number[3],&amp;test.number[4],&amp;test.number[5],&amp;test.number[6])!=EOF) {
                  //do something.....
          }
          return 0;
      }
  </code></pre>
  
  <p>The test2.c:</p>
  
  <pre><code>int main(int argc, char *argv[])
  {
      int n,m,q;
      scanf(" %d%d%d",&amp;n,&amp;m,&amp;q);
      struct test_t test;
      FILE* fp = fopen("test.txt","rw");
      while (fscanf(fp,"%d%s%d%d%d%d%d%d%d%*d",&amp;test.line,test.data,&amp;test.number[0],&amp;test.number[1],&amp;test.number[2],&amp;test.number[3],&amp;test.number[4],&amp;test.number[5],&amp;test.number[6])!=EOF) {
              //do something....
      }
      return 0;
  }
  </code></pre>
  
  <p>The definition of test_t:</p>
  
  <pre><code>struct test_t {
      int line;
      char* data;
      int number[7];
  };
  </code></pre>
  
  <p>My test.txt:</p>
  
  <pre><code>141 2015-12-05 19 16 35 06 34 46 09 00
  124 2015-12-08 49 25 10 09 40 48 32 00
  143 2015-12-10 09 29 24 47 32 34 42 00
  </code></pre>
  
  <p>When I use test1.c I got <strong>segmentation fault</strong>.But when I use test2.c, it works well.Only change the line of <code>FILE* fp = fopen("test.txt","rw");</code>.What cause this difference.</p>