Strange behaviour with fputs and a loop.
- by Jonathan
When running the following code I get no output but I cannot work out why.
# include <stdio.h>
int main()
{
fputs("hello", stdout);
while (1);
return 0;
}
Without the while loop it works perfectly but as soon as I add it in I get no output. Surely it should output before starting the loop? Is it just on my system? Do I have to flush some sort of buffer or something?
Thanks in advance.