title: Error checking fprintf when printing to stderr
body: <p>According to the docs, fprintf can fail and will return a negative number on failure. There are clearly many situations where it would be useful to check this value.</p>
  
  <p>However, I usually use fprintf to print error messages to stderr. My code will usually look something like this:</p>
  
  <pre><code>rc = foo();
  if(rc) {
    fprintf(stderr, "An error occured\n");
    //Sometimes stuff will need to be cleaned up here
    return 1;
  }
  </code></pre>
  
  <p>In these cases, is it still possible for fprintf to fail? If so, is there anything that can be done to display the error message somehow or is there is a more reliable alternative to fprintf? </p>
  
  <p>If not, is there any need to check fprintf when it is used in this way?</p>