realloc function allocates or re-
sizes the memory already allocated and free function frees the memory allocated in the heap. If you allocated the memory in the heap using malloc or any related
functionj, then you need to call the free function when that variable is out of scope. When to free the variable depends upon your functional
requirements..
Tom