#include "stdio.h"
#include "stdlib.h"
void main()
{
FILE *fp;
if((fp=fopen("C:/a.txt","r"))==NULL)
{
printf("cannot be open!\n");
exit(1);
}
char str[81];
fgets(str,81,fp);
while(!feof(fp)){
printf("%s",str);
fgets(str,80,fp);
}
fclose(fp);
}
#include"stdio.h"
main()
{
FILE *fp;
if((fp=fopen("abc.txt","r"))==NULL)
{
printf("cannot be open!\n");
exit(1);
}
fputc(fgetc(fp),stdout);
}