From what I know, malloc and calloc are just book keeping APIs on underlying memory. Keeping this in mind, I wonder if a call to free() will free up an entire array whose individual elements have been allocated memory through independent calls to malloc (or calloc).
Precisely, I have the following code:
int *num,* num_start;
num_start=num;
for(i=0;i<N;i++)
{
num = (int *)calloc(0, sizeof(int));
num++;
}
free(num_start);
Will free(num_start)
free up the entire array of N integer elements which have been dynamically allocated space, independently?