Skip to content

Glossary: C Basics

realloc

Resizes a heap block and keeps its contents, but may move it. Store its result in a temporary pointer and check for NULL, so a failure doesn't lose your only pointer to the old block.

Where the book teaches it

Related terms

mallocCapacityDangling pointer