title: Different conventions for main() in C
body: <p>My only exposure to programming has been Java,where I have not encountered (up to now) different conventions for writing the main method.I have been following to sources for learning c (K&amp;R AND C Programming A Modern Approach) where they use very different forms of the main method (function).</p>
  
  <p><strong>K&amp;R version up to now:</strong></p>
  
  <pre><code>main() {
      blah blah blah;
  }
  </code></pre>
  
  <p><strong>C Programming A Modern Approach</strong></p>
  
  <pre><code>int main() {
      blah blah blah;
      return 0;
  }
  </code></pre>
  
  <p><strong>OR</strong> </p>
  
  <pre><code>int main() {
      blah blah blah; 
      //returns nothing
  }
  </code></pre>
  
  <p>To make matters more confusing I have seen people do :</p>
  
  <pre><code>int main(void) {
      blah blah blah;
  }
  </code></pre>
  
  <p>while they either returned 0 or did not. 
  I don't in my very uneducated assumption think this is only a standards issue but maybe something a bit more conceptual or deep.
  Could someone shed some light on this issue?</p>