Not. Unable to return the bottom of the allocated memory. Also, your source code is incorrect because you are copying undefined memory.
int *array = (int*) malloc(sizeof(int)*5); // Fill memory: // array - {'J', 'o', h', 'n', '\0'}; int *array2=NULL; //Now i want to move my data one step to the left array=(int*) realloc(array,6); // array - {'J', 'o', h', 'n', '\0', X}; array2=array+1; // array2 pointer to 'o of array. memmove(array,array2,5*sizeof(int)); // This copies the indeterminate x: // array - {'o', h', 'n', '\0', X, X} array=(int*) realloc(array,5); // array - {'o', h', 'n', '\0', X}
X means indefinite.
source share