void printi(int val);
void printstr(char *str);

struct sample2 {
  int val2;
  char *str2;
};

union sample {
  int val;
  char *str;
  struct sample2 s2;
};

int main()
{
  union sample s;

  printi(sizeof(union sample));
  printi(sizeof(struct sample2));

  printi(sizeof(s));
  printi(sizeof(s.s2));

  s.val = 1;
  printi(s.val);
  printi(s.s2.val2);

  s.s2.str2 = "ABCDEFG";
  printi(s.val);
  printstr(s.s2.str2);

  return 0;
}
