Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void destroy (Number *head)
- {
- Number *pom = head;
- if (pom == NULL)
- {
- printf ("Lista pusta.");
- }
- if (pom->next == NULL)
- {
- free(pom);
- head = NULL;
- }
- else
- {
- while ((pom->next)->next != NULL)
- {
- pom = pom->next;
- }
- free (pom->next);
- pom->next = NULL;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement