Why am I getting segmentation fault in my code for Deepak and Primes

this is my code for deepak and primes
please help me find out why i am getting a segmentation fault

I dont think u can create this big array please try to make it more reasonable size.