P203. Program to understand structure padding.
#include<stdio.h>
#pragma
pack(1)
struct
st
{
char ch1;
char ch2;
char ch3;
int i1;
int i2;
int i3;
};
void
main()
{
struct st v;
printf(" Size of struct variable :
%ld\n",sizeof(v));
}
Comments
Post a Comment