sleep();
Posted 11-15-2008 at 01:32 AM by Aravinda Bhat G
Can anyone pls help me.....?
In my fedora 8,when i write this program:
#include<stdio.h>
main()
{
printf("Hi");
sleep(5);
printf("\n\n Its me");
}
i expect the program to print Hi and later,after waiting for 5 seconds,Its me
But the program,after waiting for 5seconds,prints both the statements together.
how to fix this problem....?
In my fedora 8,when i write this program:
#include<stdio.h>
main()
{
printf("Hi");
sleep(5);
printf("\n\n Its me");
}
i expect the program to print Hi and later,after waiting for 5 seconds,Its me
But the program,after waiting for 5seconds,prints both the statements together.
how to fix this problem....?