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 8862877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:50:10+00:00 2026-06-14T15:50:10+00:00

As a newb, like myself, to have great difficulty with searching the header files

  • 0

As a newb, like myself, to have great difficulty with searching the header files such as stdio.h for a function like getchar(). Somehow I picked up some information somewhere that I should not be afraid when looking in header files to “see how things work.” (C++ Primer Plus, Stephen Prata)

I am very inexperienced with header files to say the least, and programmig in general.

In my attempt to find getchar() I found that stdio.h simply branches to more and more headers, and locating getchar() became increasinly complicated and time consuming, and I never found it. Clearly I am going about this all wrong, my intention was merely to find some source code for functions I am using.

My question therefore is: Where can I find source code to truly ‘understand’ what the standard functions are ‘really’ doing?

  • 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-06-14T15:50:11+00:00Added an answer on June 14, 2026 at 3:50 pm

    If you’re looking for the declarations for variable order or other usage notes, just use an online reference or man.


    If you’re looking for the actual code, look into an implementation of the C standard library, like GNU’s libc.

    It’s worth noting though, that implementations are not simple, and their graph of dependencies goes far and wide. They also tend to interact with the machine on a lower level than most of us are used to.

    Consider libc’s implementation of getchar:

    int
    getchar ()
    {
      int result;
      _IO_acquire_lock (_IO_stdin);
      result = _IO_getc_unlocked (_IO_stdin);
      _IO_release_lock (_IO_stdin);
      return result;
    } 
    

    Probably not what you were expecting :).

    (Note: No idea how good of reference that is for C — it’s just the one I typically use for C++.)

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

Sidebar

Related Questions

This feels like a super newb question, so apologizes in advance. How does one
I am a TDD newb and I would like to figure out how to
Android newb here. Please use small words :-) I'd like to simulate typewriter output
I apologize for the newb question but have not found a solution online. I
I'm a PHP newb. Sorry if this is an FAQ... Let's say I have
I'm a total newb to LINQ. Here is the code I have so far:
I am a newb and I am trying to better myself at good practice
I hate to sound like terrible newb, but are Widgets separate apps? For instance,
I'm a total newb to security, so I have a really simple question: Is
I'm pretty much a newb with spring-hibernate and I have been trying to make

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.