02/21/00
COM1100 Winter2000 Yuhong Yin
13
Array initialization --2
nIf the number of initializers is less than the declared number of elements listed in square brackets, the initializers are applied starting with array element 0.
nFor example,
nint grades[4] = { 98, 87 };
ngrade[0] will be 98
ngrade[1] will be 87
nThe other array elements will be initialized to 0.
ngrade[2] will be 0
ngrade[3] will be 0
n