Friday, January 31, 2020

6. Insert a New node after any datavalue in SSL

/*****
 Assume SSL contains elemenst in following order <1,2,3,4>
inseratanyindex function will insert a new node after data value=2
*****/     




void inseratanyindex()
{
printf("\nLets insert a node at the End\n");
 struct node *mynode;
 struct node *temp=head;
 mynode=(struct node *)malloc(sizeof(struct node));
         
          while(temp->data!=2)
          {
             temp=temp->link;
             
          }
          mynode->link=temp->link;
          temp->link=mynode;
          mynode->data=90;
         printf("New Node Inserted Successfuly at the after node 2!\n"); 

}

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");
}
     

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