Answers for "how to get one second delay in c"

C
-1

c pause for 1 second

#include <stdio.h>
#include <unistd.h> //you need this for linux!
#include <dos.h> //you need this for Windows!

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

Code answers related to "C"

Browse Popular Code Answers by Language