The problem is that when you run a console app, it expects input from the user - and if it doesn't get it, it doesn't wait around - it closes and the console window is closed as well. As a result, you can't see anything on the screen because it just isn't there for long enough.
All you have to do is "force" it to wait for you before closing:
void main()
{
printf("Hello World!\n");
getchar();
}