Tuesday, February 4, 2020

7. Delete Node from Begning

/*****
deletnodefrombegning()
*****/
deletnodefrombegning()
{
 struct node *temp=head;
 if(head== NULL)
 {
    printf("THERE IS NO NODE TO DELETE\n"); 
 }
 if(head->link==NULL) // there is only one node
 {
     free(head);
     head=NULL;
 }
 head=head->link;
 free(temp);
}

No comments:

Post a Comment

9_Regular Expressions

Regular expressions- Sometimes in HTML, the developer defines more than one class name ( that’s class input has more than one name Here ...