black

软件工程

登录

填空题

对于如下程序: 
#include   
main( ) 
{
   FILE *fp;
   fp=fopen(“file.txt”,“w”);
   fprintf(fp,“%s”,“xyz”);
   fclose(fp); 
} 
若文件file.txt中原有的内容为good,则运行该程序以后,文件file.txt中的内容为()

【参考答案】

xyz

相关考题

填空题 下列程序的输出结果是()

填空题 下列程序的输出结果是 ()。 #include  #include   main( ) {    int i=0;    char str1[10]=“1234”, str2[10]= “567”;    strcat(str1,str2);    while(str2[i++]!=‘\0’)     str2[i]=str1[i];    puts(str2);   }

填空题 下列程序段的输出结果是()。  char str[ ]= “abc\0def\0ghi”, *q=str;  printf(“%s”,q+5);

All Rights Reserved 版权所有©财会考试题库(ckkao.com)

备案号:湘ICP备2022003000号-2