May 21, 2016 this program dont work on dev c, how can i use delay function on dev? #include #include #include using namespace std. Version: 5.4.2 OS version: Windows 7 Ultimate SP1 Problem: Delay in code typing. Recently I downloaded the 5.4.2 version of DevC. When I opened and tried to edit one of my project file which had more than 25000 lines, DevC showed a delay in printing characters on workspace that I type on keyboard. Reset tcp ip stack and auto tuning.
Delay in C: delay function is used to suspend execution of a program for a particular time.
Declaration: void delay(unsigned int);
Here unsigned int is the number of milliseconds (remember 1 second = 1000 milliseconds). To use delay function in your program you should include the 'dos.h' header file which is not a part of standard C library.
Delay in C program
If you don't wish to use delay function then you can use loops to produce delay in a C program.
#include<stdio.h>
![]()
int main()
{ int c, d; for(c =1; c <=32767; c++) for(d =1; d <=32767; d++) {} return0; }
Autotune evo torrent. We have not written any statement in the loop body. You may write some statements that doesn't affect logic of the program.
Delay C++ ExampleC programming code for delay#include<stdio.h>Dev C++ Download Windows 10#include<stdlib.h>
main()
{ printf('This C program will exit in 10 seconds.n'); Dev C++ 5.11
delay(10000);
Delay No Dev C++
This C program exits in ten seconds, after the printf function is executed the program waits for 10000 milliseconds or 10 seconds and then it terminates.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |