Linked_List_Example.c
/*
This function adds new node to the beginning of the 
list. First new node is created, then address of the head
written to this new node. Lastly, new head is changed to the
new node address.
*/
This function adds new node to the beginning of the
list. First new node is created, then address of the head
written to this new node. Lastly, new head is changed to the
new node address.
This function adds new node to the beginning of the list . First new node is created then address of the head written to this new node . Lastly new head is changed to the new node address .
void push(node_t ** head_ref, int val) 
{
	node_t * new_node;
	new_node = malloc(sizeof(node_t));
	new_node->val = val;
	new_node->next = *head_ref;
	*head_ref = new_node;
}
void push ( node_t * * head_ref , int val ) { node_t * new_node ; new_node = malloc ( sizeof ( node_t ) ) ; new_node -> val = val ; new_node -> next = * head_ref ; * head_ref = new_node ; }
This function adds new node to the beginning of the
list.
This function adds new node to the beginning of the list .