sleep function in c
snippet in c

how to sleep in c

user1857

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
 
int main(){
  
	printf("Sleeping for 5 seconds \n");
	sleep(5);
	printf("Sleep is now over \n");  
}

sleep in c programming

user7080

//sleep function provided by <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
 
int main(){
  
	printf("Sleeping for 5 seconds \n");
	sleep(5);
	printf("Wake up \n");  
}

sleep in c

user1541

sleep(5); //sleep for 5 secs

sleep function in c

user1722

#include <unistd.h>

unsigned sleep(unsigned seconds);

use sleep in c in windows

user5453

#include <Windows.h>
 
int main()
{
    Sleep(500);
}