getchar/putchar programs