Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
