Introduction
Imagine you are packing for a trip but don't know exactly how much space you will need. You want to be able to add or remove items as you go. Computers face a similar problem when running programs that need flexible space to store data. Dynamic memory allocation solves this by letting programs request and release memory while they run.