void count(struct node *start)
{
int count = 0;
struct node *p=start;
while(p!=NULL)
{
p=p->link;
count++;
}
printf("Number of nodes %d ", count);
}
A journal for curious minds & hands-on builders.
void count(struct node *start)
{
int count = 0;
struct node *p=start;
while(p!=NULL)
{
p=p->link;
count++;
}
printf("Number of nodes %d ", count);
}
Leave a Reply