title: How can I display the data I created in a linked list?
body: <p>I think there is something wrong with my create.</p>
  
  <pre><code>void add(N *p) {
      N *current, *start;
      current = malloc(sizeof(p));
      scanf("%d", &amp;current-&gt;data);
      current-&gt;next = NULL;
  
      if (p == NULL) {
          p = current;
          start = current;
      } else {
          start-&gt;next = current;
          start = current;
      }
  }
  </code></pre>
  
  <p>I think that my <code>display()</code> is correct.</p>
  
  <pre><code>void display(N *p) {
      N *current;
      current = p;
      while (current != NULL) {
          printf("\n%d", current-&gt;data);
          current = current-&gt;next;
      }
  }
  </code></pre>