Question: What happens if an array is declared to be a certain size, but is then initialized with fewer than that number of initialization data values?
What happens if an array is declared to be a certain size, but is then initialized with fewer than that number of initialization data values?
A An error occurs.
B The array will be shortened to match the number of initialization values provided.
C The initialization values are repeated, as many times as is necessary to completely initialize the array.
DThe remaining uninitialized array elements are initialized to zeros.
E The remaining uninitialized array elements are left with random unknown values.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
