Top "Eof" questions

End of file (commonly abbreviated EOF) is a condition in a computer operating system where no more data can be read from a data source.

Can read(2) return zero when not at EOF?

According to the man page for read(2), it only returns zero when EOF is reached. However, It appears this is …

c++ linux eof
Writing my own Cat function in C

Hi i don't know how to simulate my own Cat function in C, i know how it works when no …

c function eof cat fgetc
Return value of ifstream.peek() when it reaches the end of the file

I was looking at this article on Cplusplus.com, http://www.cplusplus.com/reference/iostream/istream/peek/ I'm still not …

c++ ifstream eof peek
bash EOF in if statement

I am trying to do an action in a IF ELSE statement in Bash, but receive an error like this …

bash conditional eof
(Exercise 1.6 K&R) How to verfiy that getchar() != EOF IS 0 OR 1?

I have just started to learn programming (C) as a hobby, by myself. I'm using K&R. main() { int …

c eof getchar
std::getline throwing when it hits eof

std::getline throws exception when it gets an eof. this is how I am doing. std::ifstream stream; stream.exceptions(…

c++ fstream eof getline
Comparing unsigned char and EOF

when the following code is compiled it goes into an infinite loop: int main() { unsigned char ch; FILE *fp; fp = …

c comparison eof unsigned-char fgetc
Huffman encoding - header & EOF

I am currently working on implementing a program based on the huffman algorithm in Java, and I am at the …

algorithm encoding header eof huffman-code
javaparser - Lexical error Encountered: <EOF> after : ""

I am using this javaparser https://github.com/javaparser/javaparser to parse a lot of java source codes of some …

java exception eof lexical javaparser
fgetc, checking EOF

In the book Linux System Programming I have read some like this: fgetc returns the character read as an unsigned …

c eof fgetc