Académique Documents
Professionnel Documents
Culture Documents
Assignment 1 Problem 1
Assigned problem:
Data to be stored in the following structure is given
typedef struct
{
char authors[5][40]; // first and last names of the author
char title[50]; // title of the publication
unsigned int year; // year of the publication
char isbn[15]; // publication code
} PubEntryT;
1. All the books of the first author in ascending order of their publication year.
2. All the books of the first author in descending order of their publication year.
3. All the books stored in the descending order of their isbn.
4. Tell whether a book given by its isbn is stored or not.
You should also be able to reverse the order of the store such a way that you can easily list all
the books in ascending order of their isbn.
You should read from the input text file P01.dat such entries. Each line contains fields
corresponding to the given ones, i.e. author, title, year, isbn. The field separator is comma. All
character fields should be enclosed in double quotes (i.e. "). If you need to include a double
quote within such a field, then double it. The numeric fields should be written as they are.
Sample input is given in file P01.dat. Sample output for that input is given in file P01.out.
Tasks assignment