title: Difference between Ctrl + Z and Ctrl + C
body: <p>As per my understanding Ctrl+Z means EOF, isn't it? When Ctrl+Z is passed in as an input in the following program;</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() 
  {
     int a;
     a = getchar();
  
     if(a == EOF)
         printf(&quot;Program Ended\n&quot;);
  
     printf(&quot;Finished&quot;);
     return 0;   
  }
  </code></pre>
  <p>It prints;</p>
  <pre class="lang-none prettyprint-override"><code>Program Ended
  Finished
  </code></pre>
  <p>which is totally reasonable.</p>
  <p>But when Ctrl+C is passed in as an input, Why does it outputs;
  Program Ended, and simply end the program? Wasn't it supposed to end the program without printing anything as per the code?</p>
  <p>PS: I'm using gcc 6.3.0</p>