i am getting segmentation fault in this program . please tell me why it is showing this error .
Prime visits problem
in the function prime sieve start j from 2i, rather than ii.
ya it corrected the code but why we cannot use i*i in this code ?
in the course video prateek bhaiya has used it for more optimization then why is it not working here ?
because i can have value 10^5, which would make i*i, 10^10 which cannot be stored in int, you’d have to make both i and j long long int