Possible Duplicate:
source code of c/c++ functions
I was wondering where I can find the C code that's used so that when I write printf("Hello World!"); in my C programm to know that it has to print that string to STDOUT. I looked in <stdio.h>, but there I could only find its prototype int printf(const char *format, ...), but not how it looks like internally.
printfis defined in terms ofputcso there's no need for it to make any OS calls. - R.. GitHub STOP HELPING ICEprintfhandles formatting, then callsputc, which may call other helper functions but ultimately results in an OS call. - Ben Voigtprintfis essentially a pure library function on top of lower-level stdio calls. - R.. GitHub STOP HELPING ICE