Path: utzoo!utgpu!attcan!uunet!husc6!think!bloom-beacon!gatech!ncar!oddjob!uwvax!umn-d-ub!umn-cs!mmm!ntmtka!mike From: mike@ntmtka.Ntmtka.MN.ORG (Mike Tietel) Newsgroups: comp.lang.c Subject: Re: Absolute size of 'short' Summary: Don't make assumptions Keywords: unsigned wrap-around Message-ID: <1335@ntmtka.Ntmtka.MN.ORG> Date: 3 Aug 88 19:47:50 GMT References: <214@ISIDAPS5.UUCP> Organization: Northern Telecom Inc., Minnetonka, MN Lines: 15 In article <214@ISIDAPS5.UUCP>, mike@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@ntmtka.mn.org UUCP: ...!amdahl!bungia!ntmtka!mike