title: %d with Long Int
body: <p>Is the following code Correct?As far as my understanding,it should not work properly,but on the Dev-C++ Compiler,it does.Could someone explain in detail please?</p>
  
  <pre><code>#include&lt;limits.h&gt;
  
  int main()
  {
  long int num_case=LONG_MAX;
  
  scanf("%d",&amp;num_case);
  
  printf("%ld",num_case);
  return 0;
  }
  </code></pre>
  
  <p>Thanks</p>