// This is the same main we used in Week07 - we will keep working in here // This week we will look at inserting into a linked list at any position // Sasha Vassar Week08, Lecture 13 #include #include "linked_list.h" int main (void) { //TODO: Create a pointer to the first node of the list, and the first node //The first node is pointing to NULL as the next node, since there //are no other nodes struct node *head = create_node(4, NULL); //TODO: Create the next node, with data 2 and pointing next to the current head //Therefore you are making this new node the head of the list head = create_node(2, head); //TODO: Create the next node, with data 1 and pointing next to the current head //Therefore you are making this new node the head of the list head = create_node(1, head); print_list(head); insert_endnode(5, head); print_list(head); insert_middle(3, head); //TODO: What are we giving our print_list function? print_list(head); head = delete_node(1, head); print_list(head); return 0; }