Skip to content

Instantly share code, notes, and snippets.

@ashkrit
Last active July 26, 2019 00:06
Show Gist options
  • Save ashkrit/4e290edd63b64d707e3a8226d71779a9 to your computer and use it in GitHub Desktop.
Save ashkrit/4e290edd63b64d707e3a8226d71779a9 to your computer and use it in GitHub Desktop.
int main ()
{
FILE * fp;
fp = fopen ("somejunkfile.txt", "rb");
if (fp == NULL)
{
printf("errno: %d\n", errno);
printf("Error opening the file: %s\n", strerror(errno));
exit(EXIT_FAILURE)
}
else
{
fclose (fp);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment