I have written the following code, however I get a crash (without warnings or errors) and do not know the cause:
const int N = 1000;
int main(){
int *pI = calloc(N,sizeof(int));
for (int i=0;i<N;i++) {
*(pI++) = (i+1);
}
free(pI);
return EXIT_SUCCESS;
}
I am thankful for any advice!