After performing the operations before blank1 and blank2, you have to perform two finalizing tasks/operations :
- free() the node that is supposed to be deleted, and
- Update the head to point the new head.
The statements, in the order are:
- *head = temp->next
- free(temp);
You can have other sequence for these two tasks/operations.