求教!为什么没有输出????
下面的程序很简单,但为什么就是没有输入tomoeeow,我纳闷!请有经验人士指教!#include<stdio.h>
main()
{
char a[80]="tomoeeow",b[80]="",c[80]="";
FILE *fp=NULL,*fq=NULL;
fp=fopen("a.txt","r+");
if(fp==NULL) { printf("can't open this file\n "); exit(0); }
fprintf(fp,"%s",a);
fgets(fp,"%s",b);
fq=fopen("c.txt","r+");
if(fq==NULL) { printf("can't open this file\n "); exit(0); }
fprintf(fq,"%s",b);
fgets(fq,"%s",c);
puts(c);
fclose(fp);
fclose(fq);
}