I have declared the following:
long long int *a[100000] //Global Declaration
Dynamic declaration of
a[i]
:a[i]=(long long int*)calloc(sizeof(long long int),100000); for(i=0;i<100000;i++) { for(j=0;j<100000;j++) printf("%lld ",a[i][j]); printf("\n"); }
After going through the loop my program is showing segmentation fault
Because of I'm getting right answer of some of the test cases and segmentation fault of some other test cases it means I am not accessing illegal memory.
I think The problem is with the declaration of an array of long long int
of such larger size.