Why would one use realloc() function to resize an dynamically allocated array rather than using free() function before calling the malloc() function again (i.e. pros and con
"rather than using free() function before calling the malloc() function again"
If you free the existing array, you've lost all of its contents, so you cannot "grow" the array in the usual sense.