rshankar_gupta wrote:
> hi,can any one explain about structure paddig
>
> and what will be the size of this program with structure padding
>
> stucture foo
> {
> char c;
> int a;
> float b;
> };
>
> whether it will vary with 16/32 bit compilers
sizeof(foo);
If it matters what size it is, you can use #pragma options. Most
compilers offer #pragma directives to alter structure alignment rules.
Most of the time, the size of the structure shouldn't matter.
--
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197
*NEW* VerifyMyPC 2.3
Change tracking and management tool.
Reduce tech. support times from 2 hours to 5 minutes.
Free for personal use, $10 otherwise.
http://www.CubicleSoft.com/VerifyMyPC/