プログラムが非常に短いので、おそらく簡単な修正ですが、なぜ私が奇妙な出力を得るのかを理解するのを手伝ってください:
#include <stdio.h>
int main(void)
{
char x;
printf("please enter a word, and ctrl + d to see the resault\n");
while ((x = getchar()) != EOF)
{
printf("%d", x);
}
return 0;
}
intput: 'd'
output: 10010