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
What are header files in c programming?
4. main() { int c=- -2; printf("c=%d",c); }
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
what is the function of pragma directive in c?
What is the best way of making my program efficient?
What standard functions are available to manipulate strings?
What are identifiers c?
Is there a way to compare two structure variables?
How can you tell whether two strings are the same?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
Can you please explain the difference between malloc() and calloc() function?
Tell me the use of bit field in c language?
What does node * mean?
What will be your course of action for a push operation?