When I learned C in college all we were told about header file was to include them if useing a function that needs it.

I did not like that answer, so I investigated, I opened stdio.h to see what it had inside, I found alot of pre-processor directives and function prototypes, and some defined constands and structures.

My question:

If printf() is declared (function prototype) inside stdio.h
Where is the definition?

I can cal printf:

printf("\aHello world!\n");

and #include <stdio.h> tells the preprocessor to look in the proper directory for stdio.h and put that code into my code, but that only gives me the prototype, if I were to examine my code after the preprocessor but before it is compiled, I would see alot of stuff added, but the inportant thing in my case is the prototype for printf and the definition,


Where is printf defined?