What happens when I use different succesive calloc functions over the same pointer?
int *ptr;
ptr = (int *) calloc(X, sizeof(int));
ptr = (int *) calloc(Y, sizeof(int));
ptr = (int *) calloc(Z, sizeof(int));
Where X,Y,Z are three distinct values.
You will lose the connection to the previously allocated memory and you will no longer be able to free it - a memory leak