Now that you know how to group data using struct, your task is to build a basic Inventory Management system. This will test your ability to define a structure, manipulate its members, and work with an Array of Structs.
You need to create a program that can store information for multiple products in a warehouse and then calculate the total value of the inventory.
To pass this challenge, your code must implement the following:
Product with three members:
name (a string/character array)price (a float)quantity (an integer)Product that can hold at least 3 items.scanf to fill the data for 3 products.for loop to iterate through the array, print the details of each product, and calculate the Grand Total Value (Sum of all price * quantity).Try to write the logic from scratch first. If you need a hint on the syntax for an array of structs, look at the structure below:
ptr->member syntax.typedef so you don't have to keep writing the struct keyword.scanf with strings inside a struct, remember that the name of the array (inventory[i].name) is already an address, so you don't need the & symbol!