Question: Need help to answer these two questions in C please with explanation 13. Write a function that takes the tail of a linked list and
Need help to answer these two questions in C please with explanation

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 main0 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(fnode tail, int data); 14. One of the problems with the first insertNode0 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
Get step-by-step solutions from verified subject matter experts
