When should I use perror("...") and fprintf(stderr, "...")?
https://stackoverflow.com/questions/12102332/when-should-i-use-perror-and-fprintfstderr
WEBAug 24, 2012 · You use perror() to print a message to stderr that corresponds to errno. You use fprintf() to print anything to stderr, or any other stream. perror() is a very specialized printing function: perror(str); is equivalent to. if (str) fprintf(stderr, "%s: %s\n", str, strerror(errno)); else fprintf(stderr, "%s\n", strerror(errno));
DA: 24 PA: 46 MOZ Rank: 74