title: Why did the author use double pointer in this linked list insert operation?
body: <p>In this implementation of linked list insertion, the author uses double pointer to pass the linked list to the method.</p>
  
  <p>I couldn't understand why he didn't use single pointer. Could you explain the reason for using double pointer?</p>
  
  <pre><code>void insert_list(list **l, item_type x)
  {
      list *p; /* temporary pointer */
      p = malloc( sizeof(list) );
      p-&gt;item = x;
      p-&gt;next = *l;
      *l = p;
  }
  </code></pre>
  
  <p>In other words, what would be wrong with the following implementation?</p>
  
  <pre><code>void insert_list(list *l, item_type x)
  {
      list *p; /* temporary pointer */
      p = malloc( sizeof(list) );
      p-&gt;item = x;
      p-&gt;next = l;
      l = p;
  }
  </code></pre>