We have all gone shopping before, whether for groceries, computer gadgets or milk and eggs. We expect that the cashier (human or automatic) identifies and enters a code for each item we purchase and after
entering all the items a transaction receipt is issued, we pay and go home. We may not have direct experience of running the store, but it is not hard to imagine that the transaction data is stored in a file. At the end of the day, that file, which contains all the day’s transactions for the number of customers who made purchases, can be processed to obtain such things as the numbers of items sold (by individual item,
or by category such as meat or chewing gum) and the amount of revenue (i.e. money) obtained. This is illustrated in Figure 1.
Your task is to design and write a complete C language program to carry out the job described above, in general terms. The details of this task are stated in the following paragraphs. Note that several examples
are provided on following pages in order to explain and guide you in understanding your task and how to approach it. This problem is designed to examine your understanding of file processing, and dynamic memory allocation and linked list concepts and techniques, in addition to other programming techniques.