#include <stdio.h>
int main()
{
int i=0;
char ch[100];
FILE *fp;
// write();
fp=fopen("file_name.txt","r");
// fscanf(fp,"%s",ch); //string will terminate uf we press space_bar.
fgets(ch,100,fp); //using fgets() allows us to get whole string.
while(putchar(ch[i])!='\0')
i++;
fclose(fp);
printf("\n\n\t\tread successfully !!!");
return 0;
}
change the name of the to which you want to to read
hope it will work !