Code:
#include <stdio.h>
int main()
{
union sample
{
int m[2];
float n[3];
char ch[18];
}u;
printf("The size of union = %d\n", sizeof(u));
return 0;
}
I was expecting 18 as output Here it is providing unexpected output.