Question
C Program /*Please use comments to explain the code*/ 1 Write a C program that will keep track of the number of goods in a
C Program /*Please use comments to explain the code*/
1 Write a C program that will keep track of the number of goods in a warehouse for various goods. Each will be represented by a struct containing the item number, the name and availability. The program should via a menu provide the opportunity to perform the following actions as long as the user wants:
1)Register new products 2) Print All products 3) Search for products 4) Change stock balance of goods 5) Sort products 6) Unregister goods 7)Exit the program.
When the program is launched, the program will ask the user to enter a file and then the program will load the item number, name and balance from the file and save it in an array of struct. If the file is missing, the program will start with an empty array.
When the program ends, it will overwrite / create a text file (not binary) with the previously specified name and where to save the struct in the array so that they can be loaded the next time the program is run.
Register new products
Here can we register new goods.
Print all goods
When the user selects this option prints all items in the program in the order they are stored in the program and then the main menu comes up again.
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