How do you check if file pointer is EOF?
How do you check if file pointer is EOF? The function feof() is used to check the end of file after EOF. It tests the end of file indicator. It returns non-zero value if successful otherwise, zero. How do you detect EOF? EOF is just a macro with a value (usually -1). You have to test something against EOF , such as the result of a getchar() call. One way to test for the end of a stream is with the feof function. Note, that the 'end of stream' state will only be set after a failed read. What value...