Sir,
Problem is solved, got 3rd way to remove the padding from a structure. i.e. Declare a structure like this..
struct abc
{
……..char a;
……..int b;
}__attribute__ ((packed));
main()
{
……. struct abc obj;
………printf(size);
}
Output is : 5
where as in normal 32 bit machine it comes 8 when we directly use a variable.
yups…:-)…C makes me happy
Well Done !!!