摘要:
一、问题描述:int main(){ int i = 1; while(1) { printf("%d", i); sleep(1); i++; }} 终端无输出结果。二、分析问题1. 标准输出(stdout)是行缓冲模式。其何时会输出在于:printf里有'/n',fflush(stdout)或setbuf(stdout, NULL),缓冲区已满三种。在应用程序退出时(exit()),会ffush缓冲区。2. 上述程序,如果将sleep(1) ->... 阅读全文
posted @ 2010-10-12 17:30
SunBo
阅读(896)
评论(0)
推荐(0)
浙公网安备 33010602011771号