Can we less number of values in array | Sololearn: Learn to code for FREE!

+1

Can we less number of values in array

if we declare an array with 5 values & if we initialize 4 values can exexcute or it shows error. EX: A[5]={1,2,3,4}; It shows or it executes

3/14/2019 3:48:24 PM

SRI SAI DAGGUBATI

1 Answer

New Answer

+1

If you initialize an array partially, the remaining slots are set to 0. https://stackoverflow.com/questions/10828294/c-and-c-partial-initialization-of-automatic-structure