A. Prasad
0
Q:

how to sleep in c

#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");  
}
0
sleep(5); //sleep for 5 secs
0

New to Communities?

Join the community