You are not checking how much input you received, but printing 1000 numbers each time.
and if the input is in characters you should not be printing the values as numbers. Try changing to:
printf("NUMBER OF BYTES READ: \t%d\n", num);
for (x=0; x < num; x++)
{
printf("in[%d] = %c\n", x, in[x]);
}