sleep function in c program !

hmm while working with the loops, that is so fast.. that just give us  the final output !! but if we want to put some delay in that so that
user can c that how the process is going , and that ll make ur code  looks different from the other regular codes. so try to use that(if u
want) in ur code.

for that just put :- sleep(1000)
thats it, now it will delay the process by 1sec. and start again !

Example :-
int main()

int i;
//print the number
printf(“%d \n”,i);
//delay for 1sec.


have a happy coding!
“Learn, Innovate and share” -Hitesh Parmar


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s