Hi i get a weird segmentation fault from this code:
int main(void){
int array1[10000000];
int n = sizeof(array1);
printf("%d \n", n );
return 0;
}
However if i change
int array1[10000000];
to
int array1[1000000]; ( one less zero)
The program works and prints 4000000
I'm running it on Fedora 21(64bits)
Is this because there is a maximum size for array in C? Thank you in advance