首页 > 职业考试题库1 > 题目详情
( 40 )有以下程序#include <stdio.h>main (){ FI
题目内容:
[单选题]( 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. )因类型不一致而出错
本题链接: