Following function are used concat two doubly linked list:
void concate(struct node *ptr1,struct node *ptr2) { while(ptr1->link!=NULL) { ptr1=ptr1->next; } ptr1->next=ptr2; ptr2->pre=ptr1; }