Deepak and primes.....................test case 1 and 2 is not passing why?
I have made few changes to code ,please see to it ,basically problem was of size of array and of c variable which you take in last for loop it should be in limits
#include
using namespace std;
bool sieve[100000001];
int main() {
sieve[0]=sieve[1]=1;
for(int i=2;ii<=100000000;i++)
if(!sieve[i])
for(int j=ii;j<=100000000;j+=i)
sieve[j]=1;
int N;
cin>>N;
int counter=1;
while(N && counter<100000000)
{
counter++;
if(!sieve[counter])
N–;
}
cout<<counter;
}
Hope you get it 
If any doubt feel free to ask.
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.