title: What is a "static" function in C?
body: <p>The question was about plain <a href="/questions/tagged/c" class="post-tag" title="show questions tagged &#39;c&#39;" rel="tag">c</a> functions, not <a href="/questions/tagged/c%2b%2b" class="post-tag" title="show questions tagged &#39;c++&#39;" rel="tag">c++</a> <code>static</code> methods, as clarified in comments.</p>
  
  <p>I understand what a <code>static</code> variable is, but what is a <code>static</code> function?</p>
  
  <p>And why is it that if I declare a function, let's say <code>void print_matrix</code>, in let's say <code>a.c</code> (WITHOUT <code>a.h</code>) and include <code>"a.c"</code> -  I get <code>"print_matrix@@....) already defined in a.obj"</code>, BUT if I declare it as <code>static void print_matrix</code> then it compiles?</p>
  
  <p><strong>UPDATE</strong> Just to clear things up - I know that including <code>.c</code> is bad, as many of you pointed out. I just do it to temporarily clear space in <code>main.c</code> until I have a better idea of how to group all those functions into proper <code>.h</code> and <code>.c</code> files. Just a temporary, quick solution.</p>