Define a structure to store the record of library. The
record must consist of at least following fields: Title,
Author, Edition, Price, Publisher, and Category.
-Define functions authorSearch ( ), TitleSearch ( ) and
CategorySearch ( ) to search a book with respect to author,
title and category. [There can be more than one book,
written by one author, in one category]
Answer Posted / sharmaak
Solution is simple. Have a library data structure as a struct containing all the fields
struct library
{
char title[30];
char author[30];
char edition[30];
char price[30];
char publisher[30];
char category[30];
};
But have separate data structure which make different fields searchable in log(n) time.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Which built-in library function can be used to match a patter from the string?
How can I remove the leading spaces from a string?
How many types of functions are there in c?
How would you obtain the current time and difference between two times?
What is the heap?
Why doesnt long int work?
What is the full form of getch?
Explain threaded binary trees?
What is an arrays?
What is the purpose of main() function?
Why isnt any of this standardized in c?
Can we declare function inside main?
What is an identifier?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
why programs in c are running with out #include