I wonder why this program stopped working when I increase the value of array a[] If it has, plaese tell me how to increase this value without crashing Thanks
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int i, j, save;
char a[2082001];
memset(a,'1',2082000);
for (i=2;i<=2082000;i++)
{
if (a[i]=='1')
{
save=i;
for (j=i*2;j<=2082000;j+=i)
a[j]='0';
}
}
printf("save = %d",save);
return 0;
}