I am making a program in C and need to be able to input data into an array which will clear on every restart but the array seems to be full of random data and I’m not able to input my own data. This is what I am doing to store the numbers:
int RentSmall[30];
int RentMedium[20];
int RentLarge[25];
I’m then calling it with:
printf("The small shoes that are rented are\n");
for(int i = 0; i < 30; ++i) {
printf("%d\n", RentSmall[i]);
}
Any help would be greatly appreciated.
I have tried to use other int
names and the same result is happening so I must be missing something.