On Thu, 01 Nov 2007 06:10:17 -0700, fancyerii <>
wrote, quoted or indirectly quoted someone who said :
>The answer I got is : -1046347776 it's a negative.
>While in c the result is 1624351873.
>What's wrong?
Java does not support unsigned. You used a signed printing routine.
To see it as C does, you would have to use an unsigned printing
routine. The bits are the same for both. You would have to write your
own unsignedToString method. You would write a very simple one by
masking off the high 32 bits after a conversion to long, then a
Long.toString.
see
http://mindprod.com/jgloss/unsigned.html
for the code.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com