|
Description
This example will pause
a program for a specified period of
time using the sleep() function ,
this depends a lot on the compiler
, this example was tested with Turbo
C from Borland . It DOESNT work with
Visual C++ 6 for example . This example
will pause for 5 seconds.
Code
#include <stdio.h>
#include <dos.h>
int main()
{
printf("Im going to sleep now\n");
sleep(5);
printf("Ive woken up again\n");
return 0;
}
Information
Tested with Turbo C
|