#define N 10000000
int arr[N];
int main(void)
{
int i;
for(i=0;i<N;i++)
arr[i]=i+1;
}
Why declaring the array globally do not give any compilation error? What is the chance of the availability of contiguous memory of N*4 bytes in the stack?
Same for declaring the array with static
keyword.