title: C check if file exists
body: <p>In a project I have to do in C89 standard I have to check if a file exists.
  How do I do this?</p>
  
  <p>I thought of using </p>
  
  <pre><code>FILE *file;
  if ((file = fopen(fname, "r")) == NULL)
  {
    printf("file doesn't exists");
  }
  return 0;
  </code></pre>
  
  <p>but I think there can be more cases then file doesn't exists that will do fopen == NULL.</p>
  
  <p>How do I do this? I prefer not using includes rather then .</p>