C
CBFalconer
The C Standard has always required it to be sticky. Some (perhaps
even many) implementations still get it wrong.
On stdin from the keyboard? On disk files I agree.
The C Standard has always required it to be sticky. Some (perhaps
even many) implementations still get it wrong.
Mike Wahler said:bhanu said:Try this program: EOF is always -1,
It might be for a given compiler, it easily might not
be for others. The language imposes no requirement
that it be -1, only that it is an integer less than zero,
i.e. between INT_MIN and -1.
[snip code, which does not prove that EOF is always -1]
-Mike
Adrianp said:If you want to know the value of EOF
on your compiler look in stdio.h (or
whatever io lib you are using). eg
#define EOF (-1)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.