struct item {
char name[100];
double price;
} item;
char name[100];
int shelf;
int slot;
float price;
int NumOfShelves = 50
int NumOfSlotsPerShelf = 2
struct item *arrayl = (int *) malloc(NumOfShelves * NumOfSlotsPerShelf * sizeof(int));
//this is my "arraylist" ^ i think
printf("Add an item name);
scanf("%s", &name);
printf("Add an item price);
scanf("%f", &price);
printf("Add the shelf number of the item");
scanf("%d", &shelf);
printf("Add the slot number");
scanf("%d", &slot);
//on this line. How do I add an item to that slot and shelf in my arrayl?
printf("Search for an item by first giving the shelf number:");
scanf("%d", &slot);
printf("Search by giving the slot number");
scanf("%d", &slot);
//if arrayl contains the location
//print name and price of item in that location
else {
printf("None")
return 0;
}