void main()
{
printf("Creating link_list :\n");
head=creat_list();
printf("Print the link list :\n");
print_link();
getchar();
printf("\nInput char to delete:\n");
scanf("%c",&x);
delete_link();
printf("\n Print the link list :\n");
print_link();
}
void delete_link()
{
if(head->data==x){
head=head->next;
}else{
if(head->next!=NULL){
ptr=head->next;
qtr=head;
while(ptr!=NULL){
if(ptr->data==x){
qtr->next=ptr->next;
free(ptr);
ptr=qtr->next;
}else{
qtr=ptr;
ptr=ptr->next;
}
}
}
}
}