Re: using hex in gcc

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

 



On 06/07/2012 07:33 AM, dhruv pant wrote:
> thanks got it...i was actually  thinking in some other way....
> so basically everything is actually stored in binary form.it's for our
> convenience and readability that we are converting them to hex or
> decimal.....
> so suppose...
> unsigned int i=10
> printf("%x",i) //this will print the hex equivalent of 10?

Exactly.  Pocket calculators usually store numbers in decimal,
because for them most of the work is in the I/O.  Computers
usually store numbers in binary: how you print it is up to you.

Andrew.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux