I am a beginner of C. I run the C program, but the window closes too fast before I can see anything. How can I pause the window?
If you want to just delay the closing of the window without having to actually press a button (getchar()
method), you can simply use the sleep()
method; it takes the amount of seconds you want to sleep as an argument.
#include
// your code here
sleep(3); // sleep for 3 seconds
References: sleep() manual