title: Why would you precede the main() function in C with a data type?
body: <p>Many are familiar with the hello world program in C:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  main ()
  {
      printf ("hello world");
      return 0;
  }
  </code></pre>
  
  <p>Why do some precede the <code>main()</code> function with <code>int</code> as in:</p>
  
  <pre><code>int main()
  </code></pre>
  
  <p>Also, I've seen the word <code>void</code> entered inside the <code>()</code> as in:</p>
  
  <pre><code>int main(void)
  </code></pre>
  
  <p>It seems like extra typing for nothing, but maybe it's a best practice that pays dividends in other situations?</p>
  
  <p>Also, why precede <code>main()</code> with an int if you're returning a character string? If anything, one would expect:</p>
  
  <pre><code>char main(void)
  </code></pre>
  
  <p>I'm also foggy about why we return 0 at the end of the function.</p>