strange program behaviour...
The desired program output is as follows:
#define WAIT system("sleep 2")
1)Program prints the "Hello" msg
2)It halts for 2 seconds
3)It finally exits
But if we write something like:
(\n character ommited)
then the output changes:the program first halts and
then prints the msg.
Is there anybody out there that happens to know why this happens?
On last thing on strange behaviour...
Gee,guys,thanks for all the help!!
I mean,i can't believe that so many people would like to comment my piece of code,and help me understand why this output occurs.Really appreciated,fellows!
On last thing though:does anyone know where i can find more info about the fflush function and the way the output buffer works?THe books i have about C don't say much about this.