In which header file exactly printf() function is defined??
stdlib.h/libc.so
In which header file exactly printf() function is defined??
stdlib.h/libc.so
stdio.h
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
Actually, the DEFINITION of printf() is not in any header file. There is a declaration (so that the compiler knows what the function looks like with respect to what arguments it takes), but the definition (describing to the compiler what the function does) is part of the C runtime library. In the glibc case, that would be printf.c.
As you can see from that, most of the work is done in vfprintf.c
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.