Answers for "c sleep 2 seconds"

C
0

c wait 2 seconds

#include <stdio.h>
#include <unistd.h> // notice this! you need it!

int main(){
    printf("Hello,");
    sleep(5); // format is sleep(x); where x is # of seconds.
    printf("World");
    return 0;
}
Posted by: Guest on December-26-2021
0

sleep function in c

#include <unistd.h>

unsigned sleep(unsigned seconds);
Posted by: Guest on January-20-2021

Code answers related to "C"

Browse Popular Code Answers by Language