Code Snippets C

#include
#include
int main(void)
{
FILE *filep;
char fname[128];
printf("Enter filename: ");
gets(fname);
if((filep=fopen(fname, "r"))==NULL) {
printf("Cannot open file.\n");
exit(1);
}
fclose(filep);
return 0;
}