(40 )有以下程序#include lt;stdio.hgt;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 )因类型不一致而出错

请帮忙给出正确答案和分析,谢谢!

热搜:以下哪个程序是正确的病史采集的程序