Re: printf does not print long long ints properly

2004-01-25 Thread Gerrit P. Haase
Hallo Daniel, #include main() { long long i; i=100; i*=100; printf("%lld",i); return 0; } $ ./printf 1 Am Samstag, 24. Januar 2004 um 01:41 schriebst du: > when I compile the following program: > #include > main() > { > long long i; > i=100; > i*=100; > pr

Re: printf does not print long long ints properly

2004-01-23 Thread Rolf Campbell
"ll" is the long long prefix. Daniel JeliƄski wrote: when I compile the following program: #include main() { long long i; i=100; i*=100; printf("%Ld",i); return 0; } I get the following: -727379968 instead of the expected 1 I am using gcc 3.3.1 the same code works nicely on l

Re: printf does not print long long ints properly

2004-01-23 Thread Peter Seebach
In message <[EMAIL PROTECTED]>, =?iso-8859-2?B?RGFuaWVsIEplbGnxc2tp?= writes: >I am using gcc 3.3.1 >the same code works nicely on linux machine with gcc 3.3.1 >is any other information necessary? What happens if you use %lld, which is what the standard specifies for long long, instead of the L