Multiplication of positive integers results in 0 (__int64) : <p>I am trying to multiply four integers into a <code>__int64</code>. The value it should have is <code>4096 * 1024 * 64 * 64 = 17,179,869,184</code>. This is too large of a number to store in an <code>int</code>, thats why I'm using <code>__int64</code>.
The output I get however is <code>0</code>.</p>

<p>I've tried casting every single one of the integers to a <code>__int64</code>, which doesnt change the output from being <code>0</code>.
Also, if I check with a debugger, the value of <code>test</code> is in fact <code>0</code>, so it is not a problem with outputting it.</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

int main() {
    __int64 test = (__int64)4096 * (__int64)1024 * (__int64)64 * (__int64)64;
    printf("%d", test);
    getchar();
}
</code></pre>

<p>The output:</p>

<pre><code>0
</code></pre>

<p>The expected output:</p>

<pre><code>17179869184
</code></pre>
