9 printf("Enter the name of the file you wish to see\n");
10 int prt
= scanf("%s", fname
);
12 perror("Error entering the file name.\n");
16 fp
= fopen(fname
, "r"); /* read mode */
18 perror("Error while opening the file.\n");
22 printf("The content of %s file is :\n", fname
);
24 while((ch
= fgetc(fp
)) != EOF
)