No output ,plz check this

Plz check this,not giving output

u have considered the array of 10^5 and running the loop for 10^6


its still giving segmentation fault

run the for loop of i till i*i<=n not i<=n