Segmentation Fault

What is wrong in this code. Im getting segmentation fault

hello @hemantomer1
a) increase ur max by 1.
b) use long long for loop inside prime_sieve function.

check ur corrected code here ->