For some reason when I insert n=99999999, I dont get the message "Not enough memory". The program stops running and I get the following error:
Process returned -1073741819 (0xC0000005)   execution time : 6.449 s
Why is this happening?
int i, j;
int **a=(int**)malloc(n*sizeof(int*));
if (**a==NULL){
    printf("Not enough memory\n");
    return 1;
}
for (i=0; i<n; i++) {
     a[i]=(int*)malloc(n*sizeof(int));
    if (**a==NULL){
        printf("Not enough memory\n");
        return 1;
    }
}
 
    