...
I count 5 items and as this is an int array and not a char "array" declaration, there is no last implicit last '\0' item which will add +1 to the item count.
1. A declaration of a char array with a comma-separated list of chars in braces does
not implicitly add an extra element for the zero byte. Lots of char arrays are used for things other than C-style "strings." On the other hand, if you initialize a char array with a string literal, and you don't declare the size of the array the array will be sized by the compiler to include the terminating zero byte.
2. For
any kind of array with a declared size, if the number of elements in the initializer list is smaller than the declared size of the array, the remaining elements are initialized to zero.
Regards,
Dave