Re: Help in C code snippet !

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/20/06, Soorej P <mr.soorej@xxxxxxxxx> wrote:
unsigned int a;
a=2147483698;
printf ("size= %d\n", a);

printf("size= %u\n", a);

+++++++++++
OUTPUT
+++++++++++
test.c:5: warning: this decimal constant is unsigned only in ISO C90
[root@ddd cfiles]# ./a.out
size= -2147483598

Y? .. since unsigned int should hold value up to 4294967295..

--Soorej
--
Linux is addictive, Get hooked!




--
Thanks,
Li Qun

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux