Diff b/w realloc() and free(): realloc(): > It is used to free the memory in the program. > This function is used to resize memory. > realloc() means it giving string variables into the existed memory free(): > Basically It is a macro. Macro used to deallocate memory. > free() function is used free the memory which is allocated by malloc(),calloc() functions. > free() means it empties the array.