Click here to Skip to main content
16,012,223 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can anyone help me to find a good source that explains how the printf function works internally?

Thanks in advance!
Posted
Updated 23-Jan-11 9:01am
v2

http://en.wikipedia.org/wiki/Printf[^]

obviously what u get on typing for help regarding printf in google.com..
anyways for more u can also get the source code in Linux and on shell u can type
"man printf" without double quotes for more info or even "man 3 printf" for all the versions in Linux
hope this helps if not google!!
 
Share this answer
 
This here will provide you with a start, but you'll have to dig deeper from there: The Anatomy of an Old Friend: printf[^]

Hope this helps some! If your really want to get to grips with this stuff though you'll have to grab yourself some open source C compiler with the complete source code for the standard libraries. Then you can analyze how the functions of the standard libraries are implemented.

Best Regards,
Manfred
 
Share this answer
 
v3
Comments
Espen Harlinn 23-Jan-11 15:27pm    
5+ Nice link, friendly article - I've installed Visual Studio 2010 in "C:\Vs10" so the implementation of the printf formatting functionality can be found in C:\Vs10\VC\crt\src\output.c
Manfred Rudolf Bihy 23-Jan-11 15:29pm    
Good call, Espen! I didn't even know that (some?) of the standard lib stuff was available as source code in VS.
Espen Harlinn 23-Jan-11 16:47pm    
Nice isn't it? another source of learning material we sometimes find useful. Here is another nice link: http://referencesource.microsoft.com/netframework.aspx
Sergey Alexandrovich Kryukov 24-Jan-11 0:38am    
I would vote for this if I could.
Thank you, Espen.
--SA
Sergey Alexandrovich Kryukov 24-Jan-11 0:37am    
Interesting, good to know - my 5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900