Friday, January 31, 2020

5. Insert a New Node at the end



/*****
Insert at the End  function
*****/
void inseratend()
{
          printf("\n Lets insert a node at the End\n");
          struct node *mynode;
          struct node *temp=head;
          mynode=(struct node *)malloc(sizeof(struct node));
       
          while(temp->link!=NULL)
          {
           
             temp=temp->link;
           
          }
          temp->link=mynode;
          mynode->link=NULL;
          mynode->data=70;
          printf("New Node Inserted Successfully at the End!\n");
}
     

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 ...