Step Into Labs

Step Into C · Lesson 11 · Memory

Dynamic Memory

Stack vs heap, malloc / calloc / realloc / free, memcpy and memset.

Part of Step Into C. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.

These are declared in <stdlib.h>:

In this lesson

Missions

  1. First allocation
  2. Duplicate a string
  3. A growing buffer
  4. Zeroed and set