Following should solve your problem
#include <stdio.h>
int main(void)
{
int *myarray;
int sizeofarray;
int count=0;
printf("Enter the size of array(example: 5000)\n");
scanf("%d", &sizeofarray);
myarray=calloc(sizeofarray, sizeof(int));
for (int i=208; i<=5000; i++)
{
for (int j=2; j<=i; j++)
{
if (i == j)
{
myarray[count++] = i;
printf("%d\n",i);
}
else if (i%j == 0)
break;
}
}
}