Source code for printf, scanf, cin, cout?

Closed Thread

Join Date: Aug 2004
Posts: 3
Reputation: policeachan is an unknown quantity at this point 
Solved Threads: 0
policeachan policeachan is offline Offline
Newbie Poster

Source code for printf, scanf, cin, cout?

 
0
  #1
Aug 7th, 2004
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" ?
Quick reply to this message  
Join Date: Apr 2004
Posts: 4,306
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 228
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

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

 
0
  #2
Aug 7th, 2004
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.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Quick reply to this message  
Join Date: Oct 2006
Posts: 5
Reputation: sriz6teen is an unknown quantity at this point 
Solved Threads: 0
sriz6teen sriz6teen is offline Offline
Newbie Poster

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

 
0
  #3
Feb 17th, 2008
hi all,
can any one help yar its very urgent ............

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

how they will work
Quick reply to this message  
Join Date: Dec 2006
Posts: 1,997
Reputation: Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of Aia has much to be proud of 
Solved Threads: 172
Aia's Avatar
Aia Aia is offline Offline
Posting Virtuoso

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

 
0
  #4
Feb 17th, 2008
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.
Quick reply to this message  
Join Date: Nov 2007
Posts: 978
Reputation: mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice 
Solved Threads: 208
mitrmkar mitrmkar is offline Offline
Posting Shark

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

 
0
  #5
Feb 17th, 2008
Originally Posted by sriz6teen View Post
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.
Quick reply to this message  
Join Date: Nov 2007
Posts: 34
Reputation: SergioQ is an unknown quantity at this point 
Solved Threads: 0
SergioQ SergioQ is offline Offline
Light Poster

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

 
0
  #6
Feb 25th, 2008
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.
Quick reply to this message  
Join Date: Feb 2008
Posts: 1
Reputation: bolareq is an unknown quantity at this point 
Solved Threads: 0
bolareq bolareq is offline Offline
Newbie Poster

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

 
0
  #7
Mar 3rd, 2008
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?
Quick reply to this message  
Join Date: Sep 2004
Posts: 7,540
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 704
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

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

 
0
  #8
Mar 3rd, 2008
I can easily see this thread being kept alive for four more years with "me too!" posts, so I'm closing it.
I'm here to prove you wrong.
Quick reply to this message  
Closed Thread

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC