Question: Write a C program to store / list / edit product information of a groceryCreate a struct with informations: Id Product Name Price Stock Consider
Write a C program to store / list / edit product information of a groceryCreate a struct with informations:
Id
Product Name
Price
Stock
Consider having enough space for "50" different products.
At first initialize all 50 products with their item id as "-1", so that you'll know which item in list is free.
Write these functions: (Note: All functions must be void type)add_product
This function should add product to list.
delete_product
This function should remove product from list.
edit_product
This function should edit a product from list.
total_price
This function should calculate price of all items in list.
price_percent
This function should edit all product prices by given percent. (If user enters "10", all new prices should be %10 higher, if user enters "-10", all new prices should be %10 lower etc.)
list_all
This function should all items in list with their stock and prices.
Published on March 23rd, 2018
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
