title: Please explain the purpose and mechanism of header files in C
body: <p>While reading about compilation in C, got stuck understanding header files. I've googled my best but still confused. Please explain: </p>
  
  <ol>
  <li>If we have a main program (<code>main.c</code>), which calls for a certain function, and an additional program (<code>mod.c</code>), which contains the implementation of that function, what's the point of making an extra header file (<code>mod.h</code>)? I'm aware that it contains description of that function (and presumably many other functions) but still ... what's the point? Why can't I just prepare an objective file (<code>mod.o</code>) in advance and keep it handy for any of my programs to use when needed?</li>
  <li>How this <code>#include "mod.h"</code> works? The compiler sees the file, checks description of the function inside and ... what's next? How does it know where to find the function source code? Does it read the <code>mod.c</code> file and copy-pastes it to the <code>main.c</code> file?</li>
  <li>Where is the source code of standard functions like <code>printf, scanf</code> etc. in the Linux OS?</li>
  </ol>
  
  <p>I'm sorry if my questions sound dumb.  </p>