Question: Task ( individual ) Write a C program that represents a book ( book _ title, author name & book _ id ) as a

Task
(individual)
Write a C program that represents a book (book_title, author name & book_id) as a struct.
write_data: takes a list of book structs and a file name, then writes the structs to a file with the name given [l point].
load_data: takes a file name on which book structs are stored and loads it in a list data structure in memory, then returns the list data structure [1
point].
search_by_id: takes a list of book structs and a book_id, then returns the struct object with the given id if it exists [1 point].
In main()[2 point]:
Prompt the user to choose whether to:
a. Load data.
b. Enter data.
c. Search by id.
d. Exit the program
If a, b or c are chosen, then prompt the user to enter the name of the file.
If a is chosen, then use load_data and print the list in table format on the screen.
If b is chosen, then allow the user to keep entering book structs data till a reserved character is entered. Next, use write_data to write the data to a
file with the name given. Note: You are NOT allowed to assume an upper limit on the number of struct objects the user will enter.
If d is chosen, then exit the program.
Task ( individual ) Write a C program that

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 Programming Questions!