题目内容
以下程序执行后输出结果是#include int main(){ FILE *fp; int i,k=0,n=0; fp=fopen("d1.dat","w"); if (fp == NULL) {printf("cannot open the file.\n");exit(0); } for(i=1;i<4;i++) {fprintf(fp,"%d",i); } fclose(fp); fp=fopen("d1.dat","r"); if (fp == NULL) {printf("cannot open infile.\n");exit(0); } fscanf(fp,"%d%d",&k,&n); printf("%d %d\n",k,n); fclose(fp); return 0;}
查看答案
搜索结果不匹配?点我反馈