title: strtol using errno
body: <p>I have the following code:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;errno.h&gt;
  
  void main(void)
  {
       int data;
       char * tmp;
       data = strtol("23ef23",&amp;tmp,10);
       printf("%d",errno);
       getchar();
  }
  </code></pre>
  
  <p>output is 0 ...</p>
  
  <p>why?</p>
  
  <p>i am using visual studio 2010 C++
  code must be C89 compatible.</p>