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
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
Write a function that will take in a phone number and output all possible alphabetical combinations
What is wrong with this code?
What does double pointer mean in c?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
How does sizeof know array size?
What is operator precedence?
What is anagram in c?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
Why do we use & in c?
Do you know the use of 'auto' keyword?
When is a void pointer used?
Is c still relevant?
In a switch statement, explain what will happen if a break statement is omitted?
What is difference between scanf and gets?