Absolute size of 'short'

William E. Davidsen Jr davidsen at steinmetz.ge.com
Wed Aug 3 01:03:14 AEST 1988


In article <214 at ISIDAPS5.UUCP> mike at ISIDAPS5.UUCP (Mike Maloney) writes:
| Dear C-Heavies,
| 
| Is the size of a (signed or unsigned) short integer guarenteed to
| be two bytes?  I need to manipulate and compare some unsigned ints
| modulo 65536.  It would be clean and convenient to just let the
| machine handle my wrap-around from 0 to 0xffff and verse-vica.

  Shorts are at least two bytes, but may be longer, and bytes are at
least eight bits but may be more, such as 9 on a 36 bit machine (PDP10,
Honeywell), or 12 (some DEC machine with 12 bit words).
-- 
	bill davidsen		(wedu at ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.lang.c mailing list