C Program to read data from file using fgetc() function
3 years ago
C Programming
C program to read data from file using fgetc() function
#include<stdio.h>
void main()
{
FILE *fp = NULL;
fp = fopen("file.txt", "r");
char ch = fgetc(fp);
printf("The character i read from file is : %c", ch);
fclose(fp);
}
Rajiv Shah
Jul 21, 2022