title: use of return 0; in main() in C
body: <p>I'm reading Programming in C by Brian Kernighnan an Dennis Ritchie in that(pg.25 bottom)</p>
  
  <p>Here the author quotes:</p>
  
  <blockquote>
    <p>The value that power computes is returned to main by the return statement. Any expression may follow return: return expression ;</p>
  </blockquote>
  
  <p>But in the code he provided above:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int power(int m , int n);
  
  main()
  {
      int i;
      for (i = 0; i &lt; 10; ++i)
      printf ( " %d \t %d \t %d \n ", i, power( 2 , i), power( -3 , i));
      return 0;//no. 1
  }
  
  int power(int m , int n)
  {
      int i, p ;
      p = 1;
      for (i = 1; i &lt;= n; ++i)
      p = p * m;
      return p; //no. 2
  }
  </code></pre>
  
  <p>Here I understood why he used 2. <code>return p;</code> in function power (i.e to get the value of p) but why does he use 1. <code>return 0;</code> ??
  I tried removing the line <code>return 0;</code> And it still worked as I had thought, is there something I'm missing??</p>
  
  <p>[UPDATE]
  I'm sorry for not including this before but I already knew this much:<br>
  quoted in the book:</p>
  
  <blockquote>
    <p>You may have noticed that there is a return statement at the end of
    main. Since main is a function like any other, it may return a value
    to its caller, which is in effect the environment in which the program
    was executed. Typi- cally, a return value of zero implies normal
    termination; non-zero values signal unusual or erroneous termination
    conditions. In the interests of simplicity, we have omitted return
    statements from our main functions up to this point, but we will
    include them hereafter, as a reminder that programs should return
    status to their environment.</p>
  </blockquote>
  
  <p>Thanks to @Pascal I was able to understand the difference in both the return p; and return 0;
  However my intention was never to know what return 0; was but why return was used also to know the difference between both the return statment......</p>