How does the realloc function work... Does it allocate sequence of extra mamory bloack to the existing one or does it create a complete new block and transfer the contents from the old block.. Isnt it an expensive call... Because i saw a code wherer the array started witgh the size 1 and for every char input the array was being reallocated with an extra block.. isnt this inefficient.
your thoughts??