我有这样的一段代码:
#include <stdio.h>
#include <unistd.h>
int main()
{
while(1)
{
fprintf(stdout,"hello-out");
fprintf(stderr,"hello-err");
sleep(1);
}
return 0;
}
输出为 hello-err
hello-err
hello-err
hello-err
hello-err
hello-err
,每隔1秒钟输出一次。我想知道为什么没有打印出hello-out
。