sizeof struct
Greg Pasquariello
dune at cbnewsl.ATT.COM
Sat Sep 9 10:33:57 AEST 1989
In article <29722 at pbhya.PacBell.COM> afh at 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
More information about the Comp.lang.c
mailing list