Advertisement
Guest User

upc_lib.h

a guest
May 20th, 2013
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1.  
  2. /* A record defining a retail product */
  3. typedef struct
  4. {
  5.   char upc[13];   /* 11-character UPC plus check digit */
  6.   char name[51];  /* product name */
  7.   char price[10]; /* price */
  8. } product;
  9.  
  10. /*
  11.  *  Searches for the given UPC in a list of products.
  12.  *  Returns the product with the given UPC.
  13.  *  If the UPC does not exist in the list, an empty product
  14.  *  is returned:  {"0","",""}
  15.  */
  16. product find_product(const char upc[]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement