943,742 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 54478
  • C RSS
Aug 7th, 2004
0

Source code for printf, scanf, cin, cout?

Expand Post »
dennis richie made c language with only 32 keywords all the functions and statements are to be created by the programer. if so wher is the source code of "printf" "scanf" "cin" "cout" ?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
policeachan is offline Offline
3 posts
since Aug 2004
Aug 7th, 2004
0

Re: Source code for printf, scanf, cin, cout?

They're found in the source code of a language implementation. That is, Borland C/C++, Microsoft Visual C++, Dev-C++, gnu, etc. (And the implementation of the C or C++ language may itself not be in C or C++.)

What you get when you use C or C++ is a defined interface that will make available to you a function printf that will behave in a well-defined manner. Whether the actual source of printf is written in C or assembly or Pascal or whatever is not supposed to matter.
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Feb 17th, 2008
0

Re: Source code for printf, scanf, cin, cout?

hi all,
can any one help yar its very urgent ............

where is the code for printf and scanf fucntions...

how they will work
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sriz6teen is offline Offline
5 posts
since Oct 2006
Feb 17th, 2008
0

Re: Source code for printf, scanf, cin, cout?

Maybe this will help you understand.
Don't be afraid next time of creating a new thread when you want to ask something. People frown upon old threads that get bumped to a current active state.
Last edited by Aia; Feb 17th, 2008 at 12:03 pm.
Aia
Reputation Points: 2224
Solved Threads: 218
Nearly a Posting Maven
Aia is offline Offline
2,304 posts
since Dec 2006
Feb 17th, 2008
0

Re: Source code for printf, scanf, cin, cout?

Click to Expand / Collapse  Quote originally posted by sriz6teen ...
where is the code for printf and scanf fucntions...
One place you can start with is at the following address:
http://www.koders.com/c/fid4E0FA7894...px?s=printf#L7

That one is the GNU C's implementation. I think you probably find your way from there on to scanf. And doing a google on the file name gives more results I bet.
Last edited by mitrmkar; Feb 17th, 2008 at 1:06 pm.
Reputation Points: 1105
Solved Threads: 389
Posting Virtuoso
mitrmkar is offline Offline
1,714 posts
since Nov 2007
Feb 25th, 2008
0

Re: Source code for printf, scanf, cin, cout?

Why not run your code via the debugger and when you get to the printf function step into the function. If on your machine your compiler has the full source code for the libraries (i.e. Win SDK), then you should find the code.

Maybe.
Reputation Points: 10
Solved Threads: 0
Light Poster
SergioQ is offline Offline
49 posts
since Nov 2007
Mar 3rd, 2008
0

Re: Source code for printf, scanf, cin, cout?

Hi all! I' m new in prgramming and i need the source code of scanf(). Is anybody who knows where can I find the code?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bolareq is offline Offline
1 posts
since Feb 2008
Mar 3rd, 2008
0

Re: Source code for printf, scanf, cin, cout?

I can easily see this thread being kept alive for four more years with "me too!" posts, so I'm closing it.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C Forum Timeline: c language
Next Thread in C Forum Timeline: parent/child





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC