Ok, so I'm brushing up on my C and trying to get other language nuances out of my head. I tried the following code:
... which I thought would print the statement in the printf everytime a user hit a key that wasn't the Enter key. But it doesn't print all the statements until I hit Enter. Do I need to flush stdout after each print?Code:int main(void)
{
printf("Hello world!");
while(getc(stdin) != '\n')
printf("I'm not exiting yet!\n");
return 0;
}
