When I print the size of a union like this:
union u { char c[5]; int i; } un;
using this:
int _tmain(int argc, _TCHAR*
Thanks for your suggestions. I tried this with a lots of examples and looks that union size is equivalent to (size of max element)+ padding(depending upon the size of highest datatype used).