Concatenate two singly linked list by R4R Team

Example-
First Linked list is 5->2->3
Second Linked list is 1->3->4
After concat first linklist is : 5->2->3->1->3->4

Function:

void concate(struct node *ptr1,struct node *ptr2)
{
while(ptr1->link!=NULL)
{
ptr1=ptr1->next;
}
ptr1->next=ptr2;
}




Leave a Comment: