Dynamic Memory Allocation : malloc / Calloc function
Dynamic Memory Allocation : malloc / Calloc function
- Dynamic Memory Allocation means to Allocate Memory at run-time i.e at the time of Program execution
- In C malloc and calloc functions are used to allocate memory at Run-time
- It returns pointer to block of n bytes of memory allocated during run-time
- If the Process fails i.e if it is unable to allocate memory then returns NULL
- Note : Typecasting is necessary.
Must See :