qfedu-c-level/day14/d3.c

15 lines
405 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <stdio.h>
int main()
{
int i = 0;
// 缓冲区一般为 4KB这里写入 32B不会刷新缓冲区
char m[33] = "disenjackydisenjackydisenjackyab";
printf("%s", m);
fflush(stdout); // 刷新缓冲区,目的是为了让缓冲区中的数据输出到屏幕上
while (1)
; // 用来观察程序退出时是否会刷新缓冲区,阻塞程序
return 0;
}