I\'m having some trouble understanding the difference between these two code segments: I allocate space for an array of integers dynamically within my code with the followin
You can't use sizeof with memory pointers:
int *arr = calloc(cnt, sizeof(int));
But it's ok to use it with arrays:
int arr[8];