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 does 3 mean in texting?
What is meant by recursion?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
What is 02d in c?
What are the main characteristics of c language describe the structure of ac program?
Write a program to find the biggest number of three numbers in c?
What is the difference between exit() and _exit() function in c?
Why do we use pointer to pointer in c?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
Can a void pointer point to a function?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
How is a structure member accessed?
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.