+ 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

14th Mar 2019, 3:48 PM
SRI SAI DAGGUBATI
1 Réponse
+ 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
14th Mar 2019, 4:08 PM
HonFu
HonFu - avatar