My code for deepak and primes is not passing the last testcase!

my code is not passing the last test case it is showing run time error. i think it is because of the size of the array. when I initialised the as 10^8 , it showed segmentation fault. please help. here is the link to my code

hello @Usha24
there is some issue with checker,it is showing runerror for every solution.
so try again after sometime.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.