Write the programs for Linked List (Insertion and Deletion)
operations
Answer Posted / bhargav
In Answer 1 i think there is error in dellast()
void dellast()
{
node *temp,*cur=head;
while(cur->next->next!=NULL) -------> error
{
cur=cur->next;
}
temp=cur->next;
cur->next=NULL;
printf("Deleted item is %d\n",temp->item);
free(temp);
}
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What do you mean by data types?
What is heap tree in data structure?
What will you prefer for traversing through a list of elements between singly and doubly linked lists?
Now you are given an array of a characters (both ASCII and Kanji) and, an index into the array. The index points to the start of some character. Now you need to write a function to do a backspace (i.e. delete the character before the given index).
Why set will not allow duplicates?
Differentiate between list and set.
Which is the parent class of linkedhashset class?
What is the difference between array and stack?
What is data structure and data type?
What is link list in data structure?
Can we put null key in hashmap?
What are the advantages of stack?
What is Jagged Arrays?
How do I rearrange rows in numbers?
What is the basic of data structure?