c 程序:
#include <stdio.h>
int main()
{
FILE *fd = fopen("tmpfile.txt", "r");
char c;
while ((c = getc(fd)) != EOF)
{
printf("%d, ", c);
}
}
tmpfile.txt 内容:
1
2
程序输出结果: 49, 10, 50,
程序不应该是输出: 49, 13, 10, 50,
吗?
补充:在 win11 下执行