Thanks, can't believe that was what I missed!


Lawal.O




________________________________
From: Paul Herring <[email protected]>
To: [email protected]
Sent: Sat, January 30, 2010 8:56:56 PM
Subject: Re: [c-prog] question on int

  
On Fri, Jan 29, 2010 at 11:41 PM, Olufowobi Lawal <wolex...@yahoo. com> wrote:
>
>
> How can the fact that the size of unsigned int is 4bytes and yet can't 
> accomodate this value be explained?
>
>
> #include<stdio. h>
> int main(void){
>    unsigned int usint= 4294967294;
>    printf("%d %d\n",usint, sizeof(unsigned int));

Use %u for unsigned numbers. %d is for signed numbers.

-- 
PJH

http://shabbleland. myminicity. com/ind
http://www.chavgang s.com/register. php?referer= 9375

 


      

[Non-text portions of this message have been removed]

Reply via email to