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 is the difference between classifying and sorting?
What are the disadvantages of linked list over array?
What does enum do?
Can tuple be sorted?
How is a hashset implemented?
What is dangling pointer and how to avoid it?
What is difference between list and linked list?
Which sorting algorithm is the slowest?
Why is concurrenthashmap thread safe?
How to do the intersection of two sorted arrays?
State the different types of linked lists?
in tree construction which is the suitable efficient data structure? (Array, linked list, stack, queue)
Define depth and height of a node?
What is peek in stack?
Does hashmap preserve insertion order?