Write A C Code For The Given Question

A pottery painting store offers a twoweek summer camp program.Complete the program summer_camp.c to manage registration requests for the summer camp. The program stores requests using a linked list.

Each request was stored with the student’s last name(a string),first name(a string), email (a string), age (an int), status (a string).The provided program summer_camp.c contains the structre quest declaration, function prototypes, and the main function. Complete the function definitions so it uses a dynamically allocated linked list to store the requests. Complete the following functions:

Don't use plagiarized sources. Get Your Custom Essay on
Write A C Code For The Given Question
Just from $13/Page
Order Essay




a.Ask the user to enter the student last name, first name, and email(in the exact order).

b.Check whether a request has already existed by student last name, first name, and email. If a request has the same student last name, first name, and email as an existing request in the list, the function should print a message about request already existed and exit.

c..If the request does not exist, ask the user to enter student age.For any new request, the status is “pending”.


d.Allocate memory for the structure, store the data, and append it to (add to the end of)the linked list.


e.If the list is empty, the function should return the pointer to the newly created linked list. Otherwise, add the request to the end of the linked list and return the pointer to the linked list.


2.update_status:update a request’s status. In this function, ask the user to enter(in the exact order)the student last name, first name, and email, and the status update (“approved, declined,or waiting list”).The functionfindsthe matching request(by last name, first name, and email) and update the status.If the request is not found, print a message.


3.print_list: print the complete information of all requests in the list.

4.clear_list: when the user exists the program, all the memory allocated for the linked list should be de-allocated.Note: use read_line function included in the program for reading last name,first name, and e


and taste our undisputed quality.