how to find padding done by compiler for a structure?
For ex:
struct
{
int i1;
char c1;
int i2;
} pad;
here the sizeof(pad) will be 12. Now i want to know is there any method/program to find out compiler output (*)for padding?
(*) struct
{
int i1;
char c1;
paddin;
paddin;
paddin;
int i2;
} pad;
For ex:
struct
{
int i1;
char c1;
int i2;
} pad;
here the sizeof(pad) will be 12. Now i want to know is there any method/program to find out compiler output (*)for padding?
(*) struct
{
int i1;
char c1;
paddin;
paddin;
paddin;
int i2;
} pad;
Comment