How to sleep for 3 seconds in C language

How to sleep for 3 seconds in C language

C language sleep function,
How C language makes the program wait for 3 seconds.

How to use the sleep function in C language programs.
The sleep function is declared in unistd.h

/*
Example: how to sleep in C language
*/

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
 
int main(){
  
	printf("Wait for 3 seconds\n");
	sleep(3);
	printf("after 3 seconds \n");  
}
Source:ww‮l.w‬autturi.com
Created Time:2017-08-29 09:01:54  Author:lautturi