Regarding prime visits program

I have made this program of prime minister’s visit but I am getting segmentation fault . Can you help me out?https://ide.codingblocks.com/s/477502

hello @sarthak_singhal

a)
make both the array global

b) also there is no need of calling seieve again and again.
call only once store the results in array and then use it

I have done these changes https://ide.codingblocks.com/s/477611 still it is not working

make both array global

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.