Created: 2022-06-29
Tags: #permanent
Abstract
#include <stdio.h>
#include <stdlib.h>
ITS IMPORTANT TO FREE ALL NODES!
Don't simply do this free(linked_list_name). That will only free one block of memory!!
Do this instead:
while (linked_list_name != NULL)
{
node *tmp = linked_list_name->next;
free(linked_list_name);
linked_list_name = tmp;
}