Yet another C quiz! Can you tell the output just by looking at the code? int main(void) { fork(); putchar('x'); fork(); return 0; } gcc prog.c && ./a.out Assume standard up to date Linux glibc implementation.
-
Show this thread
-
Replying to @MeBeiM
Awesome! I wonder if there are any OS settings that will disable buffering without modifying execution command?
3 replies 0 retweets 1 like
this buffering happens inside libc (I think?), so you need to use setvbuf() on the stdout file struct.
5:33 PM - 22 Jan 2020
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.