Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

puts(), like printf() and all the C-standardised "stdio" functions use buffered writes. So that is also buggy, because the buffer won't be flushed until after main() returns. You need to call and check the return value of "fflush(stdout)" manually to get the correct result.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: