dynamic memory allocation in c

Definition  —

 the process of allocating memory at run time is known as dynamic memory  allocation in c.

    Dynamic data structure periods  flexibility in adding , deleting or arranging data  items at run time.

Function of dynamic memory allocation in c .

 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

  1. Malloc()   it allocates requested size  of byte and returns the pointer to the 1st byte to the allocate space.
  2. Calloc ()    it  allocates space for of an array of elements, intilizes them to ‘O’ and then returns a pointer to the memory
  3. Free()   it is previously allocatal space.
  4. Realloc()    it modifies the size of previously allocation space.