| | |
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.
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
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.
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.
•
•
Join Date: Nov 2007
Posts: 978
Reputation:
Solved Threads: 208
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.
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.
![]() |
| Thread Tools | Search this Thread |
* adobe ansi api array binarysearch centimeter changingto char character cm convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax database directory feet fflush fgets file floatingpointvalidation fork frequency function givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux highest histogram homework i/o inches infiniteloop input interest intmain() iso keyboard kilometer km linked linkedlist linux linuxsegmentationfault list locate looping lowest match meter microsoft mqqueue mysql oddnumber odf open opendocumentformat openwebfoundation owf pattern pdf performance posix power probleminc program programming pyramidusingturboccodes read recv recvblocked repetition reversing scanf scheduling segmentationfault send single socketprograming socketprogramming stack standard string suggestions systemcall unix urboc user voidmain() wab whythiscodecausesegmentationfault win32api windows.h windowsapi





