PrimeSeive Optimized code

why this optimized code does not work to print prime numbers up to 1000000. what changes should be made to do the same

@Shobhit-Gupta-10216154901204043
Use long long int in your code instead of int for index variables. Your implementation is fine and it should work.
Try this out and let me know if you face any problem.

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.