A data structure which can be used to manage inventory data. To be generic, any kind of 2D data where we have keywords and properties associated with each, tabulated in a table.
The structure of the table while it is printed appears to be not formatted appropriately, the values of the same columns don't lie exactly below each other.
The add_key function in inventory.c is not adding the key and values to the table correctly
// Read the data from file and load into the main memorywhile (!feof(fp))
{
fscanf(fp, "%s %s", key, property);
strcpy(inventory[index][key_count], property);
index++;
}
String named key is kept unused throughout the function.
The data read by that function is messing up the whole inventory table in the secondary memory when it is opened for the second time.
When table is viewed after updating, it is incomplete even if key and all the values are added
When program is rerun and the table is fetched from the secondary storage, The whole table appears to be messed up.