Question: in C language please Definition of the Problem : Basic operations are Insertion, Deletion, Searehing and Sorting using linked list data structures. Telephone directory system

in C language please

in C language please Definition of the Problem : Basic operations areInsertion, Deletion, Searehing and Sorting using linked list data structures. Telephone directorysystem of the subscribers have the following information felds. Telephone number, Name,Last name. Structure of the "telephone.tot" file has the following fields Telephone

Definition of the Problem : Basic operations are Insertion, Deletion, Searehing and Sorting using linked list data structures. Telephone directory system of the subscribers have the following information felds. Telephone number, Name, Last name. Structure of the "telephone.tot" file has the following fields Telephone Number(7) Name(12) Last Name(12) You may define your node structure as follows struct tlplafof long telNumber; char firstName|12|; char lastName|12|; Is struct node f struct tlpinfo info; struct node "Fink; Is fypedef node "NODEFTR; Write a menu driven C program and create a simple sorted liniked list data structures which will have the node structures defined as above and do the following operations: 1. (10 Points)Pead from the file "telephone.txt" and create a linked list - Display Linked list structure. 30 Person on each paga. 2. (15 points)Read from the file telephone.txt" and create a Sorted linked list. structure (using telephone Number in ascending onder). Use insertion sort method - Display sorted list structure from the monitor(Telephone number, name, last name of the subscriber). 30 Person on each page. 3. (15 Points)Sort by name in ascending orderiusing same insertion sort method again]) . - Display(scrted base on name) subscriber information(Telephone number, name, last name of the subscriber), 30 Person in each page. Use string function 4. (15 points) New Subscriber Insertion Read a new Subscriber information (Telephone number, name, last name) as a user's keyboard input, and Insert hishher information into the proper location in the sorted linked list structure. Aftervards, - Display all subscriber information based an telephone numbers). Defore insertion, linked list struchure must be sorted based on telephone numbers. 5. (15 points) Search a person using a given name and last name and list subscriber information Read a name, last name from the keyboard and using sorted linked list information based on name. - Search the person from the sorted linked list and find and display subscriber information. Give error message if person is not in the linked list structure. Duplicated names will be checicod using last names. 6. (15 points)Search and Delete Read a subscriber information(Telephone number) from keyboard, find and Delete corresponding subscriber from the sorted linked list structure . Ater confirmation (yesino). Check all necessary conditions. If given subscriber information is not in the linked list, your program must give an error messages and repeats the input . After deletion, - Display subscriber information 30 Person on each page. Example Program: Following program creates a linked list structure using given file "telephone tot" and list linked list structure at the same time. teincludecstdio hs Bincludesstring.hp thincludecconio hs includesstdib.hp struct tiplnfor long telnumber; char firstName[12]; char lastName[12]: ji. struct node \{ struct tipinfo info; struct node "link; 3. typeder node "NODEPTR; NODEPTR getnode0: void filelntoLinkedLisNODEPTR); void display(NOOEPTR): int main0 1 NODEPTR head, p,save; head=NULL; filelntoLinkedList(head); display(headf; rebunn 0 ; 1 void display(NOOEPTR head) 1 NODEPTR save; save-head; while(savel=NULL) 1 printf("\%ld \%s \% %sin, save-sinfo.telnumber, save-sinfo.firstName,savevinfolastName); savensave->link; 8 3 void fileintolinked List(NODEPTR head) \{ struct tlpinfo temp; NODEPTR save,p; FILE "aufopen("telephone.bxt". "r"); whilefsearf(a, \%ad \%s \%sin", Asemp tehumber, temp fratName, temp LasaNamej-COF) f pagetrode0: p-sinforlemp: if (headm=NULL) headmp; save =p; else\{sarve->linkmp; save=p; ] ) p->link=NULL; 1 NODEPTR getnode0 1 NODEPTR q: q=( NODEPTR)malloc(sizeof(struct node )); retum q; 1

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!