![]() |
| ||
| representing binary values I know there is a way to represent binary, octal and hex values in C, but how do you do it? Like, say, if i wanted to specify a hex number i would do, unsigned char i = 0xFF; or unsigned char i = 0x32; What if i wanted to specify the above in binary or octal? |
| ||
| Re: representing binary values In octal, it would be unsigned char foo = 032; // a leading zero. You can't specify binary constants in standard C, though some compilers designed for small embedded processors do as an extension. |
| All times are GMT -4. The time now is 3:36 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC