10秒後にターミナルにaaaが表示される。
printf("aaa"); sleep(10);
すぐにターミナルにaaaが表示される。
printf("aaa\n"); sleep(10);
なぜ上のように挙動に変化があるのか理解ができません。
よろしくお願いいたします。
Why does printf not flush after the call unless a newline is in the format string?
https://stackoverflow.com/questions/1716296

回答1件
あなたの回答
tips
プレビュー