title: What is the difference between void and static void function in C?
body: <p>I have a two <strong>C</strong> files.</p>
  
  <p>file1.c</p>
  
  <pre><code>int main()
  {
    func(); 
    return 0;  
  }
  </code></pre>
  
  <p>file2.c</p>
  
  <pre><code>static void func(void)
  {
    puts("func called");
  }
  </code></pre>
  
  <p>But, if I compile the above code with command <code>cc file2.c file1.c</code>, I got the below, </p>
  
  <pre><code>undefined reference to `func'
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>But, If I remove <code>static</code> keyword inside <strong>file2.c</strong> and compile the above code with command <code>cc file2.c file1.c</code>, It's succesfully run. </p>
  
  <p>So, I have a question, <strong>What is the difference between void and static void function in C?</strong></p>