Re: UnSigned Long
- From: "Mike Wahler" <mkwahler@xxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 00:19:34 GMT
"Peter Nilsson" <airia@xxxxxxxxxxx> wrote in message
news:1125356275.793597.263220@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> manoj1978@xxxxxxxxx wrote:
>> Joriveek wrote:
>> > Hi,
>> >
>> > I want to store myvarz = 3000000000;
>> >
>> > I have declared myvarz as unsigned long; still not taking.
>>
>> #include <stdio.h>
>>
>> int main(void)
>> {
>> unsigned int myvarz = 3000000000;
>> printf("%u\n",myvarz);
>> return 0;
>> }
>> This is working in msvc++ 6.0 and gcc.
>
> It should 'work' on any implementation, but may print values
> like 24064 since unsigned int is not required to have more than
> 16 value bits.
Note that the OP indicated he's using type 'unsigned long',
not 'unsigned int'. 'unsigned long' must contain at least
32 bits.
-Mike
.
- References:
- UnSigned Long
- From: Joriveek
- Re: UnSigned Long
- From: Johan Borkhuis
- Re: UnSigned Long
- From: manoj1978
- Re: UnSigned Long
- From: Peter Nilsson
- UnSigned Long
- Prev by Date: Re: while (1) vs. for ( ;; )
- Next by Date: Re: print "foo" without using ;
- Previous by thread: Re: UnSigned Long
- Next by thread: Re: UnSigned Long
- Index(es):
Relevant Pages
|