(40 )有以下程序#include <stdio.h>main (){ FILE *fp;char str[10];fp=fopen (" myfile
(40 )有以下程序
#include <stdio.h>
main ()
{ FILE *fp;char str[10];
fp=fopen (" myfile.dat " , " w " ) ;
fputs (" abc " ,fp ) ;fclose (fp ) ;
fpfopen (" myfile.dat:, " a+ " ) ;
fprintf (fp, " %d " ,28 ) ;
rewind (fp ) ;
fscanf (fp, " %s " ,str ) ; puts (str ) ;
fclose (fp ) ;
}
程序运行后的输出结果是
A ) abc
B ) 28c
C ) abc28
D )因类型不一致而出错