#include typedef struct { int BarCode; float UnitPrice; int Quantity; char Description[40]; } RECORD; RECORD *DataBase; int Items; RECORD *ReadInventory(items) int *items; {FILE *DataFile; RECORD *DB,*p; int Total,TotalQuantity,i; if ((DataFile=fopen("DATA","r"))== NULL) { perror("DATA"); exit(1); } if (fread(items,sizeof(int),1,DataFile) > 0) printf("There are %d items in the Data Base \n",*items); DB=malloc(sizeof(RECORD)* *items); fread(DB,sizeof(RECORD),*items,DataFile); fread(&TotalQuantity,sizeof(int),1,DataFile); fclose(DataFile); Total=0; p=DB; for (i=0;i< *items;i++){ Total=Total+ *p.Quantity; p++; } if (Total != TotalQuantity) printf("Total Quantity counted, %d, doesn't match file spec. %d\n",Total,TotalQuantity); else printf("Total Quantity is %d\n",TotalQuantity); return(DB); } int EchoInventory(DB,Items) RECORD *DB; int Items; {int i; printf("There are %d items in the inventory \n",Items); for (i=0;i