Segmentation fault in Sieve


Please tell me how to remove the error i.e segmentation fault.
and also how to reduce such error?

hello @OhManHang
pls save ur code at cb ide and share its url with me