the process of allocating memory at run time is known as dynamic memory allocation.
Dynamic data structure periods flexibility in adding , deleting or arranging data items at run time.
Function of dynamic memory allocation .
There are four library function known as
Memory management function that can be used in allocating and freeing memory during program executions.
These function are
- Malloc() it allocates requested size of byte and returns the pointer to the 1st byte to the allocate space.
- Calloc () it allocates space for of an array of elements, intilizes them to ‘O’ and then returns a pointer to the memory
- Free() it is previously allocatal space.
- Realloc() it modifies the size of previously allocation space.