#include <stdio.h>
#include <stdlib.h>

main () {

 short int *x;
 char *y;
 int i;

  printf ("size of char: %d  size of int: %d  size of short int:%d\n", sizeof(char), sizeof(int), sizeof(short int));

  x = (short int *) malloc (sizeof(int) * 256);

  for (i=0; i<256; i++)  x[i]=i;

  for (i=0; i<256; i++) 
     printf ("%d ", x[i]);


  y = (char *)x;

  for (i=0; i<512; i++)  // why not just 256? 
     printf ("%d: %c\n", i, y[i]);

  free(x);

}
