title: Long integer overflow in C++
body: <p>Why the below code gives integer overflow warning:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      long long int x = 100000 * 99999;
      return 0;
  }
  </code></pre>
  
  <p>Whereas below code works perfectly:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      long long int x = 100000000000000;
      return 0;
  }
  </code></pre>