Changing from decimal to binary
<p>I'm using this sample code to help me accomplish decimal to binary number conversion : <a href="http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=13734&amp;lngWId=3" rel="nofollow">http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=13734&amp;lngWId=3</a> to convert from decimal to binary.</p>

<p>I tried this out successfully for smaller numbers. But when I add a number for example:
2159492075 or 2159492195. The program just outputs <code>0</code>. Also I've tried an equally sized number for example 1234567899 or 2134567899 and I get a proper binary representation for the numbers. I wonder why this?</p>

<p>Initially I thought this might have been because of defining the variables as long int:</p>

<pre><code>long int dec,k=0,i=0,j=0,n,remainder,result[100];
</code></pre>

<p>But on digging further, I don't think that is an issue. Could someone suggest what I might be doing incorrectly?</p>
