How do I pause the program?

I was wondering if it is possible to make a program pause for a second or two. If so, how would I do that?

Edit: And I have 1 more question I just thought of. In a function that returns a value, does returning a value stop that function automatically, or does the function continue with the following code even after a value has been returned?
Last edited on
1. use the header "#include<conio.h>"
2. to pause put "getch ();" inside the "main ()" program.

1
2
3
4
5
6
7
8
9
#include <conio.h>

main()
{
.
.
.
getch ();
}
after you make a return statement, the fucntion is stopped, no matter in which statement you are.

To pause a program , for a second or two, use delay() function.
Topic archived. No new replies allowed.