The `realloc` function changes the size of a previously allocated memory block, either expanding or shrinking it. It may move the block to a new location if the existing one cannot be resized in place, returning a pointer to the new memory area.
Open the full topic