struct student *create() /* Any of the create() function designed in
above examples can be used */
{
}
int searchList(struct student *First, int Roll)
{ struct student *Far;
int flag;
Far = First; /* Point to the first node */
flag =0;
while (Far != NULL)
{
if (Roll == Far->roll)
{
flag=1;
break;
}
/* Point to the next node */
Far = Far->next;
}
if (flag == 1) return 1;
else return 0;
}
6.3.4 Insertion in a Linked List
We have already appreciated that linked lists are most suitable and efficient data structures for insertion
and deletion operations. The insertion of a node in a linked list involves ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.