#include <stdio.h>
typedef enum EN{
a=0x33,
b=0x22,
c=0x11
}EN;
typedef union UN1{
int a;
char b;
float c;
}UN1;
#define maxun 3
typedef union UN2{
int a;
char b;
UN1 UNKey[maxun];
}UN2;
typedef struct AD {
int a ;
char b;
float c;
}AD;
#define maxbuff 3
typedef struct AD1{
int a;
char b;
AD ADKey[maxbuff];
}AD1;
typedef union UN3{
int a;
char b;
AD1 UNAD;
}UN3;
AD1 ADT;
UN2 UNT;
int main () {
ADT.ADKey[2].a=1;
UNT.UNKey[2].b=1;
UNT.b=1;
printf("VAL:%d\r\n",ADT.ADKey[2].a);
printf("SIZE:%d\r\nSIZE:%d\r\n",sizeof(AD),sizeof(AD1));
printf("----------------------------------\r\n");
printf("UNSIZE:%d\r\n",sizeof(UN1));
printf("UN2SIZE:%d\r\n",sizeof(UN2));
printf("UN2VAL:%d\r\n",UNT.UNKey[2].b);
printf("UN2VAL:%d\r\n",UNT.a);
printf("----------------------------------\r\n");
printf("ENSIZE:%d\r\n",sizeof(EN));
printf("----------------------------------\r\n");
printf("OK!");
return 0;
}