DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C (http://www.daniweb.com/forums/forum118.html)
-   -   Source code for printf, scanf, cin, cout? (http://www.daniweb.com/forums/thread8999.html)

policeachan Aug 7th, 2004 4:28 am
Source code for printf, scanf, cin, cout?
 
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" ?

Dave Sinkula Aug 7th, 2004 12:22 pm
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.

sriz6teen Feb 17th, 2008 11:40 am
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

Aia Feb 17th, 2008 11:55 am
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.

mitrmkar Feb 17th, 2008 12:41 pm
Re: Source code for printf, scanf, cin, cout?
 
Quote:

Originally Posted by sriz6teen (Post 537567)
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.

SergioQ Feb 25th, 2008 11:09 am
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.

bolareq Mar 3rd, 2008 12:55 pm
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?

Narue Mar 3rd, 2008 12:59 pm
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.


All times are GMT -4. The time now is 6:06 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC