Question: In this activity you will create a program, in C, for a clothing store. A linked list of nodes was created using a file from

In this activity you will create a program, in C, for a clothing store. A linked list of nodes was created using a file from argv[1], from the command line, now your job is to input the node information into a file given by the user in the command line, argv[2]. The file has to have the item name, the department where the item is stocked, the item number, the original price, the sale price, and the quantity of the item. An example of the output file:

Purple shirt Shirts 43820 42.5 31.98 300 Black pants Pants 38940 90.23 51.99 129 Red shirt Shirts 53620 45.5 38.98 274

The linked list structure with nodes used to write the file is :

struct Cost{ float originalPrice; float retailPrice; int quantity; }; struct Data{ char item[45]; char department[25]; int itemNumber; struct Cost pricing; };

typedef struct Node{ struct Data clothing_item; struct Node *next; } Node;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!