I have an array of 3 elements. But I only want to initialize 2 of them. I let the third element blank.
unsigned char array[3] = {1,2,};
int main(){
printf("%d",array[2]);
return 0;
}
The print result is 0. I tested it on IAR, and some online compiler.
Is there any C rule for the value of third element? Is there any compiler filling the third element by 0xFF ? (Especially cross compiler)