malayaj
Programmer
- Mar 19, 2001
- 11
Dear Friends..
My today's query on the first look may seem to be childish but it is troubling me a lot.
I want to ask you that "WHAT IS THE CHARACTER IN A FILE WHICH INDICATES End Of
File ?" And what is it's ASCII value?
Friends, I am working on a C project in which I have to read certain information from a file of Specific format. I have to read that file and extract some info.
I read the file using "while loop " which terminates on EOF( );
Now what heppens that when I read it some times (1 in 100 files) I notice EOF (value = -1)
In mid of the file.
And thus my program terminates although much data has left unread which makes all the things useless as I use that information for further processing.
IS IT THEORATICALLY POSSIBLE?
I tried to loopover that character in order to read other ones but that even did not work.
If you too have noticed this type of problem in your work then help me out..
regards
MALAYAJ
My today's query on the first look may seem to be childish but it is troubling me a lot.
I want to ask you that "WHAT IS THE CHARACTER IN A FILE WHICH INDICATES End Of
File ?" And what is it's ASCII value?
Friends, I am working on a C project in which I have to read certain information from a file of Specific format. I have to read that file and extract some info.
I read the file using "while loop " which terminates on EOF( );
Now what heppens that when I read it some times (1 in 100 files) I notice EOF (value = -1)
In mid of the file.
And thus my program terminates although much data has left unread which makes all the things useless as I use that information for further processing.
IS IT THEORATICALLY POSSIBLE?
I tried to loopover that character in order to read other ones but that even did not work.
If you too have noticed this type of problem in your work then help me out..
regards
MALAYAJ