In C language, if initialize an array like this:
int a[5] = {1,2};
then all the elements of the array that are not initialized explicitly w
The assignment a[2]= 1 is an expression that has the value 1, and you essentially wrote int a[5]= { 1 }; (with the side effect that a[2] is assigned 1 as well).
a[2]= 1
1
int a[5]= { 1 };
a[2]