title: deleting first node in linked list still shows node in results
body: <p>I'm having trouble with deleting the first node in my linked list, when i print the results after deleting other nodes its a success, yet deleting the first node, its prints a 0 and the last two members of the struct.</p>
  
  <p>The function is supposed to be passed a pointer to a linked-list, prompt the user for an ID number to find a delete a node, and return the list.</p>
  
  <pre><code>struct dog *delete_from_list(struct dog *dogs){
  
  int num;
  
      printf("Enter a dogs ID number to be deleted ");
      scanf("%d", &amp;num);
  
  struct dog *prev, *cur;
  
      for(cur = dogs, prev = NULL;
              cur !=NULL &amp;&amp; cur-&gt;number != num;
              prev = cur, cur = cur-&gt;next);
  
       if (cur == NULL){
  
              printf("Dog not found");
              return dogs;
      }
       if( prev == NULL){
  
  
              dogs = dogs-&gt;next;
  
              printf("Dog deleted");
  
      }
       else{
  
              prev-&gt;next = cur-&gt;next;
      }
  
  
      free(cur);
  
  
      return dogs;
  
  }
  </code></pre>
  
  <p>This is the function to print the linked list afterwards</p>
  
  <pre><code>void print(struct dog *list){
  
      /* Prints all structs within the
       * linked list
       */
  
  
      printf("\nID Number\t Dog Name\t Breed\t\t Owner\n");
      for( ; list != NULL; list = list-&gt;next){
  
              printf("%d\t\t  %-10s\t  %-10s\t %-12s\n", list-&gt;number, list-&gt;dog_name, list-&gt;breed, list-&gt;owner_last_name);
  
      }
  </code></pre>
  
  <p>}</p>