Académique Documents
Professionnel Documents
Culture Documents
#include <stdio.h>
#include <stdlib.h>
void main()
{
FILE *fptr;
char filename[15];
char ch;
if (fptr == NULL)
{
printf("Cannot open file\n");
exit(0);
}
ch = fgetc(fptr);
fclose(fptr);
} /* End of main () */
/*----------------------------------------------
Output
Enter the filename to be opened
emp.rec
Name = Prabhu
Age = 25
Salary = 25000.00
------------------------------------------------*/