I am using C for my programming. Please use scanf, printf and #include. Not quit
ID: 441503 • Letter: I
Question
I am using C for my programming. Please use scanf, printf and #include. Not quite sure how to do this. Write a program to maintain a phone book. The phone book must be maintained as a linked list. Your program must have the following menu: 1. Add entry The user will be prompted to enter a name and a phone number, and the entry will be inserted into the list. 2. Lookup number The user will be prompted to enter the name they are looking for, if the name exists, it will print the entire entry. If not, print "not found". You can assume for this assignment there will not be multiple entries with the same name. Hint: consider using strcmp to compare the name entered with the name in each phonebook entry. 3. Delete entry The user will be prompted to enter the last name of the user to be deleted. The matching entry will be displayed with a message to confirm the deletion (y/n). Upon confirmation, the entry will be deleted. If the deletion is not confirmed, they will be returned to the main menu. 4. Print the entire address book. 5. Quit Make sure you make proper use of functions and proper code formattingExplanation / Answer
THIS WILL BE HELPFUL FOR YOU AND PL RATE ME 1ST AND PL AWARD ME KARMA POINTS Your program must accept the following commands. Note that the pointy brackets, indicate user defined input and are not typed in the input. add # can be any string not containing the pound ("#") character. can be any integer. Create an entry with the corresponding values and add it to your address book. find If there is an entry with a name field that contains the given string, print the entire entry. If not, print "not found". del Delete the entry of the phone book corresponding to the name. del Rajni should delete the entry for the name "Rajni". For this form, the name must match exactly. If no such name exists, print a message indicating that there is no one by that name. print Print the address book as it exists so far. You will need to define a structure for an entry in the phone book containing a pointer to the next entry. typedef struct entry { char name[40]; int phone_no; struct entry * next ; } * pbook; You may define the following functions: pbook makeentry ( char name[], int phonenum) ; // This should call malloc() to allocate space for a new entry pbook addlentry (pbook newentry, pbook phonelist) ; void find (pbook phonelist, char name[]) ; pbook delete (pbook phonelist, char name[]) ; void printlist (pbook phonelist) ;Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.