In which header file exactly printf() function is defined??
stdlib.h/libc.so
Printable View
In which header file exactly printf() function is defined??
stdlib.h/libc.so
stdio.h
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