On Tue, Mar 27, 2007 at 03:06:45AM -0000, rshankar_gupta wrote: > hi,can any one explain about structure paddig
http://en.wikipedia.org/wiki/Data_structure_alignment > and what will be the size of this program with structure padding > > stucture foo > { > char c; > int a; > float b; > }; It depends which compiler, operating system and CPU you use. > whether it will vary with 16/32 bit compilers Yes. It will even vary using the same compiler, with different settings, eg. #pragma pack.
