title: Error: difference between perror and fprintf
body: <p>Any difference between the following two approaches when encountering and error?</p>
  
  <pre><code>if (!mallocd_buffer) {
  
      // this?
      fprintf(stderr,"malloc() failed in file %s at line # %d", __FILE__, __LINE__);
  
      // or this?
      perror("Failed to copy a string\n\n\n\n\n");
  
      exit(EXIT_FAILURE);
  }
  </code></pre>