I have declared the length of array as 4. But after assigning a[21]=56, is not giving me error. However, the output comes to be 56.
#include<stdio.h>
int main(){
int a[4]={10,20,30,40};
a[20]=57;
printf("%d",a[20]); }
I have declared the length of array as 4. But after assigning a[21]=56, is not giving me error. However, the output comes to be 56.
#include<stdio.h>
int main(){
int a[4]={10,20,30,40};
a[20]=57;
printf("%d",a[20]); }