The moose likes Other Languages and the fly likes What does EOF mean? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Other Languages » Other Languages
Reply Bookmark "What does EOF mean?" Watch "What does EOF mean?" New topic
Author

What does EOF mean?

Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 152


this is the code...which i got from the net....but i dont seem to understand it..what does EOF mean here? and what is the ideal output here?

this code is supposed to count the number of words

thanks


Do What You Wanna Be....Taking Things The Way They Come
scjp 1.6 91 percent, scmad 90 percent(rounded off to nearest integer)
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50691

end of file


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 152
so when i run this program i get a console window which never seems to stop...i want to stop the input as soon enter is pressed...how do i do it?
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
EOF is a constant that is defined in the stdio.h file and used for the end of file value. For more Google can help.

A decent google hit
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 152
what happens if ctrl-d is pressed? i dont get any different answer...just a new character...but nothing happens becuase of it
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 26710
If I remember correctly, and I probably don't, EOF is ctrl-D on Mac and *nix, but ctrl-Z or ctrl-Z/return on Windows and DOS.
 
 
subject: What does EOF mean?
 
Threads others viewed
gettin error with TextReader
get me out of thissssssssss
Exception in Thread-Inventory Program
NullPointerException problems in Main
another NullPointerException problem
developer file tools