The following code has an array of fixed size 2 that means it should store maximum 3 elements a[0],a[1],a[2] but on giving further values compiler don't show any error message and the values are stored correctly.How?
#include <stdio.h>
int main() {
int a[2];
a[0] = 1;
a[1] = 2;
a[2] = 3;
a[3] = 9;
a[4] = 99;
printf("%d\n", a[0]);
printf("%d\n", a[1]);
printf("%d\n", a[2]);
printf("%d\n", a[3]);
printf("%d\n", a[4]);
return 0;
}
OUTPUT: -1 2 3 9 99
.