October 2004
Beginner
408 pages
9h 24m
English
If your application ran so quickly that you didn't even have time to see it, don't be surprised. The reason for this is that on some operating systems (think Windows here) the console application will open, the C executable will run, and the console will close again—that is, unless you do something to stop it.
So here's a little trick you can use if you are having this problem. Simply open your hello.c script and add the getchar() function to your main() function. This will make the application wait for the Enter or Return key to be pressed before continuing to execute.
1. | Open hello.c (Script 1.2) in your text editor or IDE. |
2. | After the printf() line and before return ... |
Read now
Unlock full access