Project#4 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 inventory.h #ifndef _inventory_h #define _inventory_h #define ERROR_INVALID_SEARCH_OPTION "Invalid search option.\n" #define ERROR_NO_BOOK_FOUND "No book found matching the search criterion.\n" #define MAXIMUM_TITLE 20 #define MAXIMUM_AUTHOR 20 #define MAXIMUM_BOOKS 10 typedef struct{ char subject[MAXIMUM_TITLE] char author[MAXIMUM_AUTHOR] int year int edition float price }Book typedef struct { Book booksFound[MAXIMUM_BOOKS] int searchMatches } BookSearchResult /*Interface functions for this application.*/ /*function to read the book information. It returns the structure of type book*/ Book getBookInformation(void) BookSearchResult searchBook(Book [], int size, int option, int value) void displayResult(Book [], int) #endif ____________________________________________________________________________________________________ _ inventory.c #include<stdio.h> #include<stdlib.h> #include "inventory.h" int main(void){ int size,i,option,value Book book_data[MAXIMUM_BOOKS] BookSearchResult result
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/05/2011 for the course EE 150 taught by Professor Lanxiang during the Spring '11 term at Montgomery College.

Page1 / 6

Project#4 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online