#include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE *fp;
if ((fp = fopen("d:\\notexistingfile.txt", "r")) == NULL)
{
perror("fopen: Could not open file for reading");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
/*
run:
fopen: Could not open file for reading: No such file or directory
*/