Question: Need help to answer these questions in C language please with an explanation.I will rate you 10. Write a function that deletes every other element

Need help to answer these questions in C language please with an explanation.I will rate you

Need help to answer these questions in C language please with an

10. Write a function that deletes every other element in a linked list. (Try writing it both ways: one where it starts deleting at the head of the list, and one where it starts deleting at the element just after the head of the list.) Can you write this both iteratively and recursively? 11. Write a function that deletes all even integers from a linked list. 12. Write a function that takes a sorted linked list and an element to be inserted into that linked list, and inserts the element in sorted order. The function signature is: node *insertSorted(node *head, int n) 13. Write a function that takes the tail of a linked list and inserts a new element at the tail. Ensure that the function returns the new tail of the list. How would you have to call this function from main) in order to ensure you update your head and tail pointers correctly? (In what case(s) do we need to update the head pointer when performing tail insertion?) The function signature is: node "taillnsert(node tail, int data) 14. One of the problems with the first insertNode) function is that it requires us to call it using head- insertNode(head, i). That's a bit dangerous, because we could forget the "head -" part very easily. Re- write the function so that it takes a pointer to head, thereby allowing it to directly modify the contents of head without any need for a return value. The function signature is: void insertNode(node *"head, int data). The function will be called using insertNode(&head, i,)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!