title: Linked List with a pointer to a array of char
body: <p>I have a linked list whose elements are of type</p>
  
  <pre><code>typedef struct List * News;
  struct List
      {
           char * Text;
           News NextN;
      };
  </code></pre>
  
  <p>In the main function I declared an array of type News as follows</p>
  
  <pre><code>News PTH[50];
  for (i = 0; i &lt; 50; i++)
      {
           PTH[i] = (News) malloc(sizeof(struct List));
           PTH[i] -&gt; Text = NULL;
           PTH[i] -&gt; NextN = NULL;
      }
  </code></pre>
  
  <p>I added new nodes in the beginning of the list with</p>
  
  <pre><code>if ( PTH[i] -&gt; Text == NULL)
      PTH[i] -&gt; Text = msg;
  else 
      {
          t -&gt; Text = msg;
          t -&gt; NextN = PTH[i];
          PTH[i] = t;
      }
  </code></pre>
  
  <p>Where <code>msg</code> is a array of char of length 2000; and and then tried to print the texts apointed by <code>PTH[i] -&gt; Text</code> with</p>
  
  <pre><code>p = PTH[i];
  if (p -&gt; Text != NULL)
      {
          printf("%s", p -&gt; Text);
          p = p -&gt; NextN;
      }
  while (p != NULL)
      {
          printf("%s", p -&gt; Text);
          p = p -&gt; NextN;
      }
  }
  </code></pre>
  
  <p>This algorithm only add one node. The error is how I define the <code>PTH</code> or is there an error in how I put nodes in the list.</p>