Answered step by step
Verified Expert Solution
Question
1 Approved Answer
typedef struct { char * title; char * author; int year; } Book; Book * create _ library ( char * ) ; This function
typedef struct
char title;
char author;
int year;
Book;
Book createlibrarychar ;
This function reads in booklist.txt provided and creates an array of Book structs. It returns a pointer to this array.
void displaybooksBook ;
This function takes the pointer to the array of books, and prints them to the screen.
void reversebooksBook ;
This function creates a reversed book list and returns a pointer to the reversed array.
savetofileFILE Book ;
This function saves the reversed list to a file.
You will need to pass the name of the file on the command line and pass it as an argument to createlibrary You are free to implement helper functions if you wish.
Compile your program using: gcc Wall pedantic library.c stdco library
To run the program: library booklist.txt reversedlist.txt
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started