Make your own free website on
Memory Allocation

Memory Allocation

When you declare an array of size 1000, all 1000 memory locations are reserved for this array regardless of whether you end up using them or not.

Static allocation: all at once

Dynamic allocation: as needed

Example: recording names of individuals.