I guess you're using Dev-C++? (since Ctrl-F9 is 'compile' for me, using Dev-C++.)
In any event, this program won't compile for a whole lot of reasons. But before I get to that, when you push Ctrl-F9 and compilation fails, check the bottom of the Dev-C++ screen, the "Compiler" tab should list all the errors that caused it to fail.
Here are the errors you get and explanations of why you get them.
Line 1: #include expects "FILENAME" or <FILENAME>Your #include <stdio.h> should all be on one line.
Line 2: Syntax errorRelated to above, since <stdio.h> is bad syntax on its own.
Now, if I fix this and put
#include <stdio.h>
on a single line, the program compiles and does what you expect it to do. But even so there are still a few other problems with it! It is not good ANSI-compliant C code to declare 'main' as taking no arguments. The prototype for 'main' should be
int main(int argc, char **argv)
where the argument 'argc' is the "Argument Count", the number of command-line arguments passed to your program, and 'argv' is the "Argument Vector", the array of the command-line arguments.
It is also bad form to use getchar() as a 'pause' function -- I assume that is why you put it in? Since you don't do anything with the character you get, you just throw it away. If you want to write in a pause function, (although this is Windows-dependent, not ANSI), it is better style to do:
system("pause");
This will execute a system call as if you were directly typing on the command line, and the "pause" command is the DOS command that returns the "Press any key to continue..." prompt.
I believe you have to #include <stdlib.h> in order to get the system() function.
So this is how the program should read:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
printf( "I am alive! Beware.\n" );
system( "pause" );
return 0;
}