void printcx(char val);
void printix(int val);

union sample {
  char c[4];
  int i;
};

int main()
{
  union sample s;
  int i;
  char *p;

  s.c[0] = 0x12;
  s.c[1] = 0x34;
  s.c[2] = 0x56;
  s.c[3] = 0x78;

  p = (char *)&s;
  for (i = 0; i < 4; i++) {
    printcx(*(p++));
  }

  return 0;
}
