{
int c;

while ((c = getchar()) != EOF){
putchar(c);
printf("%d\n", getchar() != EOF);
}

}
で、testと入力して実行すると
t1
s1
って結果になるんですがこれでOKです?結果が理解できないです。