问题
单项选择题
有以下的程序
#include<stdio.h>
void fun(char *fname,char *st)
FILE *myf; int i;
myf=fopen(fname,"w");
for(i=0;i<strlen(st);i++)fputc(st[i],myf);
fclose(myf);
main()
fun("test.t","new world");fun("test.t","hello,");
程序执行后,文件test.t中的内容是 ( )
A.hello,
B.new worldhello,
C.new world
D.hello,rld
答案
参考答案:A