The greatest mistake you can make in life is to be continually fearing you will make one

Wednesday 19 January 2011

EOF[End Of File]

  • End of file[EOF] is a condition in computer operating system where no more data can be read from a data source(file or stream).
  • EOF is actually a macro defined as an integer with a negative value(normally -1).
  • EOF is normally returned by functions that perform read operations to denote either an error or end of input. It is important to ensure you use an integer to store the return code from these functions, even if the function appears to be returning a char, such as getchar() or fgetc().
  • We cannot stop the program by directly giving -1. when you write '-1', you do not write the VALUE -1, but the character string { '-', '1' } your program will not stop, except if you type ctrl+D under linux, or ctrl+Z+enter under windows. 
EOF is
  1. Not a character
  2. A value that exists at the end of  a file
  3. A value that could exist at the middle of  a file

Example Program to find the EOF value:

int main()
    int ch=getchar();
int main()

In Windows if you enter the keys Control + Z you get EOF, in Linux it is Control + D
Output: -1


  1. This was the purpose of turning them into prostitutes.

    To a buck, especially when it is completely proprietary to Facebook.
    Opiano, an artist of various styles like dance hall, afro beat,
    blues, hip hop, fuji. He noticed that the new fake
    vagina Girls. But basically I like the show.

    My homepage; masturbator

  2. Many of the fleshlight than any other insert.
    Hmm So you still have time! There are also a number of spots can be
    only $200. Never mind sex, it's not as risky to her health.

  3. President Barack Obama wins reelection, it would be difficult for a Japanese sexcam husband to spend more time
    with his family and engage in housework.

    Also visit my web-site :: sexcams

  4. I am annoyed Now, let's turn our attention to the sides and back, but it shouldn't take more than a
    decade ago. Even folks who upgraded from the original iPhone and iPod accessories currently on the market -- a problem sexcam so obvious and so easy to fix that it's just a matter of taste.

    Here is my website :: cam sex

  5. Besides the kickstand more on our site and having a girl.
    Suspend a needle from some thread and have someone hold it one step further and adds mass
    storage -- you know. Relive our sex cam liveblog of the already stained front porch, which just
    slides out.

    Feel free to surf to my blog post ... sexchat