Dynamic Memory Allocation : malloc / Calloc function

Dynamic Memory Allocation : malloc / Calloc function

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

Must See :

  1. Calloc
  2. Malloc