title: Using getline to get input and check if that is CTRL-D in C
body: <p>im pretty new to c and bascially the problem im having is this currently i have this</p>
  
  <pre><code>  char* buf = (char*) malloc(sizeof(char) * MAX_LINE);
    size_t n=MAX_LINE;
    getline(&amp;buf, &amp;n, stdin);
  </code></pre>
  
  <p>How do i check buf in order to see when CTRL-D has been entered? </p>
  
  <p>Thank you so much</p>