title: Program crashes when printing a linked list on screen
body: <p>I don't know why I can read the Linked list without problems in LABEL : 1 ; but the program just crashes and print grabage in the LABEL : 0 ;
  In other terms, why the linked list works fine inside the lecture function , but not outside it ?
  Here is my code :</p>
  
  <pre><code>/* including libraries */
  #define V 20
  
  typedef struct DATA{
      char* NomP;char* NomA;
      struct DATA *Next;
  }DATA;
  
  // Prototypes .
  
  int main(void)
  {
      char FileName[V];
      puts("Data file ? : ");gets(FileName);
  
      FILE* fs = fopen(FileName,"r"); // Check if fs is NULL
  
      DATA *HEAD = MALLOC(sizeof (DATA)); int len = lecture_data(fs,HEAD);
      print_data(HEAD,len); //LABEL : 0
      return 0;
  }
  
  int lecture_data(FILE *fs,DATA *ROOT)
  {
      char cNom[V],cArticle[V];
      int eofs=0;int i=0;
  
  while(!eofs)
  {
      DATA *Data = MALLOC(sizeof (DATA));
      fscanf(fs,"%s %s",cNom,cArticle);
      Data-&gt;NomA = MALLOC(strlen(cArticle)+1);
      Data-&gt;NomP = MALLOC(strlen(cNom)+1);
      strcpy(Data-&gt;NomA,cArticle);
      strcpy(Data-&gt;NomP,cNom);
      if( i==0 )
      {
          Data -&gt; Next = NULL ;
          ROOT = Data ;
      }
      else
      {
          DATA* Ptr = ROOT ;
          while( (Ptr-&gt;Next) != NULL )
          {
              Ptr = (Ptr -&gt; Next);
          }
          Data -&gt; Next = NULL ;
          Ptr -&gt; Next = Data ;
      }
      i++;
      eofs = feof(fs) ;
      // check ferror(fs) here
  }
      puts("Start of reading :");
  
      print_data(ROOT,len); // LABEL : 1
  
      puts("End Of Reading ");
      fclose(fs);
      return i;
  }
  </code></pre>
  
  <p>Here is the printing function : </p>
  
  <pre><code>void print_data(DATA *L_ROOT,int len)
  {
      int i = 0 ;
      DATA* LINK;
      LINK = L_ROOT;
      while( LINK != NULL )
      {
          printf("%d : DATA-&gt;NomA : %s\n",i,LINK-&gt;NomA);
          printf("%d : DATA-&gt;NomP : %s\n",i,LINK-&gt;NomP);
          LINK = LINK -&gt; Next ;
          i++;
      }
  }
  </code></pre>