Question: This is C language. I need help with these functions that manipulate linked lists. Linked list has 2 pointers, first one for the next name

This is C language. I need help with these functions that manipulate linked lists.

Linked list has 2 pointers, first one for the next name by First name and the second one is for the Last name.

Program needs to print error messages if the person in the list does not exist when updating or removing from the list

Sample execution is attached below.

void printNumber(long val) { // convert phone number from the format xxxxxxxxxx (10 digits) to xxx-xxx-xxxx

return; }

void printByFirst(MultiLinkedList *list) { // print (traverse the byFirst list)

return; }

void printByLast(MultiLinkedList *list) { // print (traverse the byLast list)

return; }

int lookup(MultiLinkedList *list, char *name) { // print all instances of name (as either a first name or a last name)

return; }

void updatePhone(MultiLinkedList *list, char *first, char *last, long number) {

// update the phone number for the individual specified

return; }

MultiLinkedList *removeItem(MultiLinkedList *list, char *first, char *last) { // remove the individual specified from the list

return; }

MultiLinkedList *updateFirst(MultiLinkedList *list, char *first, char *last, char *newFirst) { // update the first name of the individual specified

return; }

MultiLinkedList *updateLast(MultiLinkedList *list, char *first, char *last, char *newLast) {

// update the last name of the individual specified

return; }This is C language. I need help with these functions that manipulate

Execution of the Program with the Sample testData file /a.out Enter an option (add, size, printByFirst, printByLast lookup, updatePhone, removeItem updaterirst, updateLast, quit): add Enter first name Judy Enter last name: Garland Enter phone number (10 digits, no dashes) 2058375609 Enter an option add Enter first name : Bert Enter last name Lahr Enter phone number (10 digits, no dashes)8006492568 Enter an optionsize The phone list has 2 items Enter an option printByFirst Bert Lahr 800-649-2568 Judy Garland 205-837-5609 Enter an option add Enter first name : Jack Enter last nameHaley Enter phone number (10 digits, no dashes) 9707779311 Enter an optionsize The phone list has 3 items Enter an option printByLast Judy Garland 205-837-5609 Jack Haley 970-777-9311 Bert Lahr 800-649-2568 Enter an option add Enter first name Roy Enter last name Bolger Enter phone number (10 digits, no dashes) 4796060842 Enter an optionsize The phone list has 4 items Enter an optionlookup Finding all instances of Judy in the list Enter name to search for Judy Judy Garland 205-837-5609 1 matches Enter an option updateFirst Enter original first name : Judy Enter last name: Garland Enter new first name Judith Enter an option printByFirst Bert Lahr 800-649-2568 Jack Haley 970-777-9311 Judith Garland 205-837-5609 Roy Bolger 479-606-0842 Enter an option Execution of the Program with the Sample testData file /a.out Enter an option (add, size, printByFirst, printByLast lookup, updatePhone, removeItem updaterirst, updateLast, quit): add Enter first name Judy Enter last name: Garland Enter phone number (10 digits, no dashes) 2058375609 Enter an option add Enter first name : Bert Enter last name Lahr Enter phone number (10 digits, no dashes)8006492568 Enter an optionsize The phone list has 2 items Enter an option printByFirst Bert Lahr 800-649-2568 Judy Garland 205-837-5609 Enter an option add Enter first name : Jack Enter last nameHaley Enter phone number (10 digits, no dashes) 9707779311 Enter an optionsize The phone list has 3 items Enter an option printByLast Judy Garland 205-837-5609 Jack Haley 970-777-9311 Bert Lahr 800-649-2568 Enter an option add Enter first name Roy Enter last name Bolger Enter phone number (10 digits, no dashes) 4796060842 Enter an optionsize The phone list has 4 items Enter an optionlookup Finding all instances of Judy in the list Enter name to search for Judy Judy Garland 205-837-5609 1 matches Enter an option updateFirst Enter original first name : Judy Enter last name: Garland Enter new first name Judith Enter an option printByFirst Bert Lahr 800-649-2568 Jack Haley 970-777-9311 Judith Garland 205-837-5609 Roy Bolger 479-606-0842 Enter an option

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!