Quote:
Originally Posted by manascetatbbsr
fgets() function does not work inside any loop or any function outside the main function in a c programe.
|
Of course it does. fgets() doesn't know or care if it is inside a loop.
Quote:
Originally Posted by manascetatbbsr
i have debugged the programe using gdb and found that the the string conatins '\n' all times after execution for the first time.
|
What program? Do you check the return value? Maybe you *are* reading emtpy lines?
Quote:
Originally Posted by manascetatbbsr
is ther not any functions that takes string as input including blanc space.
|
Huh? fgets() reads from a file. There is no input string.