Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6254163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:08:14+00:00 2026-05-24T14:08:14+00:00

today i just lay on my bed meditating programming stuff when an idea flows

  • 0

today i just lay on my bed meditating programming stuff when an idea flows into my mind which i can’t solve with my own ability.Below is the Question.

I read a book that explain why EOF value is -1 and the explanation is as follow :

Why -1?Normally getchar() returns a value in the range 0 through 127 , because those are values corresponding to the standard character set , but it might return values from 0 through 255 if the system recognizes an extended character set . In either case , the value -1 does not correspond to any character , so it can be used to signal the end of file.

1.)It is weird for the statement above because i remember besides signed integer , signed character is also one type of variable exist in C , so that’s mean the value from -128 to 127 can be used.But why still the book mention -1 does not contradict to any character use for keyboard input??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:08:15+00:00Added an answer on May 24, 2026 at 2:08 pm

    The standard doesn’t say it’s -1.

    EOF which expands to an integer constant expression, with type int and
    a negative value, that is returned by several functions to indicate
    end-of-file, that is, no more input from a stream

    It’s not a value that you can read from a file. It’s an “out of band” value that getc and such can’t return in any case other than “end of file”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just today I've started using Drupal for a site I'm designing/developing. For my own
I just started playing around with threading today and I ran into something that
Today somebody told me that interface implementation in C# is just Can-Do relationship, not
I just started today looking into Groovy. I consider using it to replace some
I just started to learn object oriented programming today and just by observation noticed
Today I have just thrown together this PowerShell script which takes a tab-delimited text
I was asked this in an interview today and I just can't figure it
Today I just learned that Adobe Air has a local SQL database, which is
I've just today learned of asp.net mvc, and I'm wondering what is needed from
So today I just came across the 'live()' function that binds any future and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.