How To Make A Sleep Function In C Code Example


Example 1: sleep in c programming

//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");   }

Example 2: 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");   }

Example 3: use sleep in c in windows

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

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable