void printc(char val);
void prints(short val);
void printi(int val);

union sample {
  char c;
  short s;
  int i;
};

union sample func()
{
  static union sample s;

  s.c = 1;
  s.s = 2;
  s.i = 3;

  printc(s.c);
  prints(s.s);
  printi(s.i);

  return s;
}

int main()
{
  union sample s;

  printi(sizeof(union sample));
  printi(sizeof(s));

  s.c = 10;
  s.s = 20;
  s.i = 30;

  printc(s.c);
  prints(s.s);
  printi(s.i);

  s = func();

  printc(s.c);
  prints(s.s);
  printi(s.i);

  return 0;
}
