Example 2.1, K&R: Wrong symbolic constants value for LONG_MIN and LONG_MAX?
<p>This is the code which I use to find the symbolic constant values for LONG</p>

<pre><code>   #include &lt;limits.h&gt;     //These header files contains the symbolic constants
   #include &lt;float.h&gt;      //for different datatypes

   #include &lt;stdio.h&gt;

    int main(void){

            printf("\tMininum numeric value for long type: %ld\n", LONG_MIN);
            printf("\tMaximum numeric value for long type: %ld\n", LONG_MAX);

            printf("\tMaximum numeric value for unsigned long type: %lu\n", (unsigned)ULONG_MAX);
    return 0;
   }  
</code></pre>

<p>Output which I get is:</p>

<pre><code>  Mininum numeric value for long type: -9223372036854775808
  Maximum numeric value for long type: 9223372036854775807
  Maximum numeric value for unsigned long type: 4294967295
</code></pre>

<p>But if see the limits.h from the man page. These are the symbolic constants for <code>LONG_MIN</code>, <code>LONG_MAX</code>, <code>LLONG_MIN</code> and <code>LLONG_MAX</code> from the <code>limits.h</code> file in my system.</p>

<pre><code>  {LONG_MIN}
          Minimum value of type long.
          Maximum Acceptable Value: -2 147 483 647

  {LONG_MAX}
          Maximum value of a long.
          Minimum Acceptable Value: +2 147 483 647

  {LLONG_MIN}
          Minimum value of type long long.
          Maximum Acceptable Value: -9223372036854775807

  {LLONG_MAX}
          Maximum value of type long long.
          Minimum Acceptable Value: +9223372036854775807
</code></pre>

<p>As if, the program is giving me the values from Long long symbolic constants.</p>

<p>Why is this happening?</p>