Related questions with answers
Let's mark an array's size declarator as x and the number of elements in the initializer list as y.
When an array definition statement contains both the initializer list and the array size declarator, where x is larger than y, the elements in the initializer are initialized into the first x slots in the array. The rest of the array is then filled with the default value, which in case of numeric types is 0.
Recommended textbook solutions
More related questions