In C, sometimes my output will not be printed on the terminal until I print a newline character \n . For instance:
int main() { printf("Hello, World"); printf("\n"); return 0; }
Hello World will not print until the next printf (I know this from setting a breakpoint in gdb). Can someone explain why this is happening and how to get around it?
Thanks!
source share