/*****
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");
}
No comments:
Post a Comment