//DISPLAY 13.4 Function to Add a Node at the Head of a Linked List //Function Declaration struct Node { int data; Node *link; }; typedef Node* NodePtr; void head_insert(NodePtr& head, int the_number); //Precondition: The pointer variable head points to //the head of a linked list. //Postcondition: A new node containing the_number //has been added at the head of the linked list. Function Definition void head_insert(NodePtr& head, int the_number) { NodePtr temp_ptr; temp_ptr = new Node; temp_ptr->data = the_number; temp_ptr->link = head; head = temp_ptr; }