Question: The language is C. A copy- paste of the program above is below. Thanks #include #include #include typedef struct person { char *name; int age;

The language is C. A copy- paste of the program above is below. Thanks
#include
CS 100 Lab 10 - Spring 2018 -A Take-home Lab This hh maintains a linked list ot pople, whereeach node contins a name (one-wor nses only and the age ot . PrULLIpLs Lhe user Lur tuulus aud ans, building Luc lisL wuh calls lo add. priruni lluc lis1 aller cach a id .Promprs the user for a name, and then prinrs the age of tat pesnf they are in the list The code hekw is on larkh. You mmust do the to lowing: Write the finction getage thar rerurns the age of the name passed to ir, or-1/f the person does not exist ite-wrire add so rhar ir?cks in alphaber col order. I)o not add a nene ir ft already eristsin rhelist 'I har s, hefore adding, traverse the st tomake sure the rame is nor alreaty t. rint aneor message if it exr * * wo sample inputs tor the program ? re shown at the bottom right of the code . typodet atruct peroon printiPer returna the age o the rexaon or l it not Cound ahar input1 1100) int inpat2 Peraon yLiat-NULL whil input2- 01 print2(ayn.clbe list io now . "); priat ?xyList); Fred 30 Wilma 29 Barney 26 Betty 25 printi.. 'n?nThe final list ic print layLiath printf[?n?nRnter the lane of per00D to look up their age : "); printtc Enter a nane to look up tbeir age orxto exit : "1 return D void printIPerooo ptr) Fred 30 Fred 29 Fred 29 Wilma 2g Wilma 30 return nentiode-ext- lirst, on ur loca machine, compress your lah0 diectory in a single compressel tile
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
