I am using a numeric array as an example to my core question.
What happens when an array declaration statement does not provide an initial value for each of the elements in a numeric array?
I know that the compiler does not automatically initialise the elements (C++ standards and running on my compiler). What i dont know is how do I articulate what is in the uninitialised elements? is it:
1) All array elements contain a numeric value; or
2) All elements may contain garbage
Point 1 is my de-facto understanding all along on what happens under the hood. Ive tested it time and time again with my compiler that the values in the uninitialized indices are numbers of some sort.
Yet, I have seen on forums where people say that they "may contain garbage" and not numbers. My question is: surely point 1 and 2 are the same thing? If not, what is the difference? What does "garbage" mean?