The following is my code in C
main(){
int a[1];
a[0]=10;
a[1]=12;
printf("%d\n",a[1]);
copy_arr(a);
printf("%d",a[1]);
}
The following is the output
12
12
Shouldn't it give array out of bound or something like this?
Or does the code above depend on the compiler?
I am running the above in a gcc compiler.