Linked_List_Example.c
/*
This function counts the every node of the list 
by iterating over them. If the head pointer is NULL
then returns 0
*/
This function counts the every node of the list
by iterating over them. If the head pointer is NULL
then returns 0
This function counts the every node of the list by iterating over them . If the head pointer is NULL then returns 0
int list_size(node_t * head)
{
	int size = 1;
	node_t * current = head;
	if (head == NULL)
		return 0;
	while (current->next != NULL) 
	{
		size += 1;
		current = current->next;
	}
	return size;	 
}
int list_size ( node_t * head ) { int size = 1 ; node_t * current = head ; if ( head == NULL ) return 0 ; while ( current -> next != NULL ) { size += 1 ; current = current -> next ; } return size ; }
This function counts the every node of the list
by iterating over them.
This function counts the every node of the list by iterating over them .