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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started