title: Why don't I have to include my header files when compiling with GCC?
body: <p>It was my understanding that in order to use a function declared in a header file and defined in a matching source file, said header file must be included before main(). So why does the following compile and run just fine using:</p>
  
  <p><em>gcc -o hello hellomain.c hello.c</em></p>
  
  <p><strong>hellomain.c</strong></p>
  
  <pre><code>int main(int argc, char *argv[])
  {
      helloPrint();
  
      return 0;
  }
  </code></pre>
  
  <p><strong>hello.h</strong></p>
  
  <pre><code>#ifndef hello_h
  #define hello_h
  
  void helloPrint();
  
  #endif
  </code></pre>
  
  <p><strong>hello.c</strong></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void helloPrint()
  {
      printf("Hello, World!");
  }
  </code></pre>
  
  <p>This is obviously a very simplified example but it illustrates my question; why don't I have to include "hello.h" in "hellomain.c"? Thanks!</p>