Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!att!cbnewsl!dune From: dune@cbnewsl.ATT.COM (Greg Pasquariello) Newsgroups: comp.lang.c Subject: Re: sizeof struct Keywords: sizeof struct Message-ID: <1814@cbnewsl.ATT.COM> Date: 9 Sep 89 00:33:57 GMT References: <29722@pbhya.PacBell.COM> Reply-To: dune@cbnewsl.ATT.COM (Greg Pasquariello) Distribution: na Organization: AT&T Bell Laboratories Lines: 16 In article <29722@pbhya.PacBell.COM> afh@PacBell.COM (Alan Hobesh) writes: : : :The following c code prints the size of the definded structure to be 44, :when compiled on an AT&T 3B20 running UNIX V5.2.1. :However, when the code is downloaded to a PC and compiled using Turbo C, :the size of the structure is reported to be 42. : :Why is there a difference and which is the correct size? They are both correct. The structure is padded to be word aligned. Greg Pasquariello att!picuxa!gpasq