Question: prices.csv file: 3. Create a program that parses a CSV file of product data and loads the items into a struct with the following members:

 prices.csv file: 3. Create a program that parses a CSV file

prices.csv file:

of product data and loads the items into a struct with the

3. Create a program that parses a CSV file of product data and loads the items into a struct with the following members: . ID Name Price Quantity Additional Requirements Use file prices.csv for an example of what the input data will look like. Your program should take two arguments: an input file to process and a price limit. Print only the names of cach item to stdout that have a price less than or equal to the given limit. If an item has 0 stock, indicated by quantity, do not print it out. If the given file does not exist or cannot be opened, warn the user by printing "CANNOT OPEN FILE." to stdout. Save your code as price_check.c. Example Run $ ./a.out prices.csv 199.99 MSI X470 Gaming Plus Corsair DDR4 Memory E 399.99 479.98 294.98 654.31 10 5 21 1 11 B 1000 Intel Core i7-10700K 1001 Intel Core i7-9700K 1002 Intel Core i7-4790K 1003 Intel Core i7-9800X 1100 AMD Ryzen 9 3900XT 1101 AMD Ryzen 5 3600XT 2000 MSI X470 Gaming Plus 2100 ASUS ROG Strix B550-E 3000 MSI GeForce RTX 3080 3001 MSI GeForce RTX 3090 4000 Corsair Vengeance RGB Pro 16GB 4100 G.SKILL Ripjaws V Series 32GB 4101 G.SKILL TridentZ RGB Series 32GB 4200 Patriot Viper Steel 16GB 15 13 7 0 498.99 249.99 124.99 279.99 759.99 1549.99 87.99 113.99 134.99 149.99 0 4 8 3 1 3. Create a program that parses a CSV file of product data and loads the items into a struct with the following members: . ID Name Price Quantity Additional Requirements Use file prices.csv for an example of what the input data will look like. Your program should take two arguments: an input file to process and a price limit. Print only the names of cach item to stdout that have a price less than or equal to the given limit. If an item has 0 stock, indicated by quantity, do not print it out. If the given file does not exist or cannot be opened, warn the user by printing "CANNOT OPEN FILE." to stdout. Save your code as price_check.c. Example Run $ ./a.out prices.csv 199.99 MSI X470 Gaming Plus Corsair DDR4 Memory E 399.99 479.98 294.98 654.31 10 5 21 1 11 B 1000 Intel Core i7-10700K 1001 Intel Core i7-9700K 1002 Intel Core i7-4790K 1003 Intel Core i7-9800X 1100 AMD Ryzen 9 3900XT 1101 AMD Ryzen 5 3600XT 2000 MSI X470 Gaming Plus 2100 ASUS ROG Strix B550-E 3000 MSI GeForce RTX 3080 3001 MSI GeForce RTX 3090 4000 Corsair Vengeance RGB Pro 16GB 4100 G.SKILL Ripjaws V Series 32GB 4101 G.SKILL TridentZ RGB Series 32GB 4200 Patriot Viper Steel 16GB 15 13 7 0 498.99 249.99 124.99 279.99 759.99 1549.99 87.99 113.99 134.99 149.99 0 4 8 3 1

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!