you are finding prime till 10^6 then why are you taking array size 10^6+5 instead of 10^6+1?
Why array size is 10^6?
hey @pallavivarshney267 you can take +1 too
its always safe to take + more than 1 like 5
its no issue as it doesn’t affect anything its
just good practice.
i hope its cleared if yes please mark the doubt
as resolved 
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.