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 memory
while (!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.

Is it an issue or am I going wrong somewhere?
The add_key function in inventory.c is not adding the key and values to the table correctly
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.
Is it an issue or am I going wrong somewhere?