Discuss the dynamic memory allocation functions in detail, with examples
Example 1: free in c
the C library function void free(void *ptr)
deallocates the memory previously allocated by a call to calloc, malloc, or realloc.
Example 2: allocate memory c
ptr = (castType*)calloc(n, size);