Why if I change the size of one of the dimensionality of an array I get a run-time Error: "Segmentation Fault?". Example:
#include <stdio.h>
#define DIM 8
int main(int argc, char **argv)
{
int a[3][3][3][3][3][3][3][3][3][3][DIM],
b;
a[1][1][1][1][1][1][1][1][1][1][1] = 2;
b=a[1][1][1][1][1][1][1][1][1][1][1];
printf("%d \n",b);
return 0;
}
If DIM is 8 it generated no run-time error, but just if DIM is greater than 8, it causes run-time Error "Segmentation Fault". Why ???