I created an array of 10 elements in C inside of main and declared values for only some of the elements. When printing out the array I noticed that one of the elements, which was left untouched, was not initialized to zero. Instead, it was initialized to a different large value every time (i.e. 1491389216). I then commented out all of my code and just left the array as I initially declared it.
When running the code, the first 8 elements of the array were initialized to zero, the 9th element in the array was being initialized to a large value (like 1491389216) which changed every time, and the last element was consistently being initialized to the same non-zero number.
Does anyone have any idea why this is happening?