摘要:
1、下面的程序并不见得会输出 hello-std-out,你知道为什么吗?123456789101112#include <stdio.h>#include <unistd.h>int main() {while(1){fprintf(stdout,"hello-std-out");fprintf(stderr,"hello-std-err");sleep(1);}return 0;}参考答案:stdout和stderr是不是同设备描述符。stdout是块设备,stderr则不是。对于块设备,只有当下面几种情况下才会被输入,1)遇 阅读全文
posted @ 2013-01-04 17:20
startcool
阅读(235)
评论(0)
推荐(0)

浙公网安备 33010602011771号