Answer:
Explanation:
6.....................................
void insertToPlace(struct node * &T,int val,int place)
{
struct node * q=T;
int count =1;
while(T->next!=NULL&&count<place-1)
{
T=T->next;
count++;
}
if(T->next==NULL)
{
struct node * p = (struct node *)new struct node;
p->data=val;
p->next=NULL;
T->next=p;
}
else
{
struct node * p = (struct node *)new struct node;
p->data=val;
p->next=T->next;
T->next=p;
}
T=q;
}