Hello,
In the following union, the size of the union variable displayed using sizeof operator is 52. If I comment the integer, the size is 50. If I include double variable also, the size is 56. What is the reason for this? The size should only be 50 right (size of Largest member)
Code:union myUnion { int var1; char char1; //double mydouble1; char string1[50]; };