title: program in C that close quickly
body: <p>I'm programming in C and I download code block IDE because it's easier to use. As you know, the minimal code in C is to write: <strong>Hello World</strong> in a CMD window. When I try to launch the program via code block, it works but when I open the <code>.exe</code> file directly, it open and close quickly. Can someone explain me why?</p>
  
  <pre><code>#include &lt;stdio.h&gt; 
  
  int main() { 
      int age = 0; 
      printf("how old are you?");
      scanf("%d", &amp;age); 
      printf("You are %d", age); 
      getchar(); 
      return 0; 
  }
  </code></pre>