title: Printing unsigned long long int Value Type Returns Strange Results
body: <p>I have a problem while using the <code>printf</code> function to print values of type <code>unsigned long long int</code></p>
  
  <p>I have no idea what's wrong. I'm using Dev-Cpp 4.9.9.2 and Visual Studio 2010 Professional (I know that it's not C compiler, but anyway, wanted to try) on Windows 7 Professional 64-bit. For displaying, I used <code>%llu</code> modifier (according to <a href="https://stackoverflow.com/questions/2844/how-do-you-printf-an-unsigned-long-long-int">How do you printf an unsigned long long int(the format specifier for unsigned long long int)?</a>) but I also tried I64d with no effect...</p>
  
  <hr>
  
  <p>Firstly, I just wanted to print minimum and maximum value of <code>unsigned long long int</code> (using <code>ULONG_MAX</code> from <code>limits.h</code>)</p>
  
  <pre><code>printf("unsigned long long int: \n%llu to %llu \n\n", 0, ULONG_MAX);
  </code></pre>
  
  <p>Returns:</p>
  
  <blockquote>
    <p>unsigned long long int: 18446744069414584320 to 1580552164021 <em>(Dev-Cpp)</em></p>
    
    <p>unsigned long long int: 18446744069414584320 to 0 <em>(Visual Studio)</em></p>
  </blockquote>
  
  <hr>
  
  <p>Then I tried to using <code>printf</code> to print two zeros </p>
  
  <pre><code>printf("unsigned long long int: \n%llu to %llu \n\n", 0, 0);
  </code></pre>
  
  <p>Returns:</p>
  
  <blockquote>
    <p>unsigned long long int:
    0 to 1580552164021 <em>(Dev-Cpp)</em></p>
    
    <p>unsigned long long int: 0 to 0 <em>(Visual Studio)</em></p>
  </blockquote>
  
  <hr>
  
  <p>Also tried two <code>ULONG_MAX</code> values</p>
  
  <pre><code>printf("unsigned long long int: \n%llu to %llu \n\n", ULONG_MAX, ULONG_MAX);
  </code></pre>
  
  <p>Returns:</p>
  
  <blockquote>
    <p>unsigned long long int: 18446744073709551615 to 1580552164021 <em>(Dev-Cpp)</em></p>
    
    <p>unsigned long long int:
    18446744073709551615 to 0 <em>(Visual Studio)</em></p>
  </blockquote>
  
  <hr>
  
  <p>Why does it behave like that? Could you explain it to me?</p>