Absolute size of 'short'

Mike Tietel mike at ntmtka.Ntmtka.MN.ORG
Thu Aug 4 05:47:50 AEST 1988


In article <214 at ISIDAPS5.UUCP>, mike at ISIDAPS5.UUCP (Mike Maloney) writes:
> Is the size of a (signed or unsigned) short integer guarenteed to
> be two bytes?  ...

No.  All that can be guarenteed is that:
     (sizeof short) <= (sizeof int) <= (sizeof long)

Therefore, there are no guarentees about the absolute size of a short.
Even under two different compiler implementations for the same hardware,
the sizes might be different.

mike tietel
-- 
mike at ntmtka.mn.org
UUCP: ...!amdahl!bungia!ntmtka!mike



More information about the Comp.lang.c mailing list