sleep in c
snippet in c

how to sleep in c

user9712

#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

user7160

//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++ linux

user2438

#include <unistd.h>
 sleep(10);

sleep in c

user1588

sleep(5); //sleep for 5 secs