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

Re: Arduino TRE



On Fri, Oct 04, 2013 at 11:59:04AM -0300, Beco wrote:
> Thanks for your to thoughts! Now you make me wonder about the size of
> an "int", and maybe the size of a "char".

char is 8 bit and unsigned (unlike x86 where it is signed).
int is 32bit like all other linux 32bit systems.

> I wonder what the c code (yayhhh we can use gcc on a arduino!) bellow
> would print:
> 
> printf("unsigned %lu bits %lu bytes\n", (long
> unsigned)sizeof(unsigned)*CHAR_BIT,(long
> unsigned)(sizeof(unsigned)*CHAR_BIT)/8);
> 
> printf("int %lu bits %lu bytes\n", (long unsigned)sizeof(int) *
> CHAR_BIT, (long unsigned)(sizeof(int) * CHAR_BIT)/8);
> 
> 
> Anyone with access to one of theses babies?

-- 
Len Sorensen


Reply to: