cant understand why it is giving segmentation fault
Sieve code doubt
hello @rohit_1906
it is giving segmentation fault because u r declaring a very large size array inside main .
in a question it has been asked to find nth prime
n <=5000000
how to do this if n is this big
check value of 5000 000 th prime number and declare ur sieve size just greter than that.
also use boolean datatype for sieve this will consume less memory.
for n that big it is anyhow giving me segmentation fault
can you share the code that calculates 50000000th prime