> Possibly, but (int) is normally 4 bytes on a 32-bit machine. However,
> the standard does not say much about how long an (int) is

C is peculiar in that it mkaes a point not to define the size of data
types. The only requirement is sizeof(char) == 1. On hardware which is
32 bit and can not handle anything less than 32 bits in one command,
this leads to sizeof(char) = sizeof(int) = sizeof(short) = 1. gcc  at
first had quite a few problems with it. On microcontrollers you'll most
likely find sizeof(char)=1, sizeof(int)=2, sizeof(short)=1, and all in
bytes of 8 bit. On Microsoft typically sizeof(int)=2 (at least was), and
on Unix typically sizeof(int)=4. For portable programs you can't of
course rely on any of this.

Volker

-- 
Volker Kuhlmann                 is possibly list0570 with the domain in header
http://volker.dnsalias.net/             Please do not CC list postings to me.

Reply via email to