Possible Duplicate:
How to dynamically allocate memory space for a string and get that string from user?
I have a file. while reading line by line from a file, length of the string is unknown so how to allocate memory for unknown length string in an efficient way.
note:-
each line in a file is seperated by "\n".
programming language - c