I have a question on the document located at https://www.arduino.cc/en/Reference/Array where they state an example of initializing an array as follows:
int mySensVals[6] = {2, 4, -8, 3, 2};
Later on they explain that "Finally you can both initialize and size your array, as in mySensVals. Note that when declaring an array of type char, one more element than your initialization is required, to hold the required null character."
That phrase would apply to another example, in which they do this:
char message[6] = "hello";
That does make sense, because it's char type, and "hello" word has 6 characters.
However, coming back to the first example, that's not a character type array. It's Integer type. That seems confusing
Because later on they state another example:
int myArray[10]={9,3,2,4,3,2,7,8,9,11};
There we go, they initialized the array with ten spaces, the array has 10, not 9, 10 elements, as it should have. However that doesn't match the first example I'm referring to, in which he initializes the array with 6 spaces but loads only 5 elements into it.
I'm not trying to be smart here, just curious because I'm actually not totally understanding that example. If you find it wrong, please correct it because it's leading to confusion. Else, please add some further explanation on the document itself to clarify Java developers newbies on C, like myself.
Thank you for your attention, you've built a great website with plenty handful documentation.