Find the length of given linked list

This program shows how to create linked list using dynamic memory allocation and pointers.After creating the linked list ,the length of linked list is calculated.For calculating the length,variable len is used.Every node of the link list is considered using while loop.While loop continous until the link list is not equal to NULL.The variable len is incremented by 1 if link list is not equal to NULL.At the end of while loop,the variable len gives the length of link list.

#include < stdio.h >
#include < conio.h >
#include < alloc.h >
#define newnode (struct node*) malloc(sizeof(struct node))

struct node
{
	int data;
	struct node *next;
};

struct node *create_list();

void main()
{
	struct node *f;
	int len;
	f = NULL;
	clrscr();
	
	f = create_list();
	len = find_len(f);
	printf("\n length = %d",len);
} // main

struct node *create_list()
{
	struct node *f,*c,*p;
	int tdata;	
	f = NULL;
	printf("\n Enter data ( use 0 to exit ) : ");
	scanf("%d",&tdata);
	while( tdata != 0 )
	{
		c = newnode;
		if( c == NULL)
		{
			printf("\n Insuf. mem. ");
			exit(0);
		}
		c->data = tdata;
		c->next = NULL;
		if( f== NULL)
			f = c;
		else
			p->next = c;
			p = c;
			printf("\n Enter data ( use 0 to exit ) : ");
			scanf("%d",&tdata);
	} //while
	return(f);
} // create list

int find_len(struct node *f)
{
	int len=0;
	struct node *t;	
	if( f == NULL)
	return(0);
	t = f;	
	while( t != NULL )
	{
		len++;
		t = t->next;
	}
	return(len);
}