Not all data in the array has been initialized for (i = 0; i < MAXITEMS / 10; i++) orig[i] = 0; I think use int orig[MAXITEMS+1] = {0}; is better. It was found by valgrind.
Not all data in the array has been initialized
for (i = 0; i < MAXITEMS / 10; i++)
orig[i] = 0;
I think use
int orig[MAXITEMS+1] = {0};
is better.
It was found by valgrind.