下面程序的运行结果是( )。#include<stdio.h></stdio.h>main(){ FILE fp; int a=2,b=4,c=6,k,n; fp=fopen("test.dat","w"); fprintf(fp,"%dn",a); fprintf(fp,"%d %dn",b,c); fclose(fp); fp=fopen("test.dat","r"); fscanf(fp,"%d%d%d",&k,&n); printf("%d %dn",k,n); fclose(fp);}
- A、2 4
- B、2 6
- C、4 2
- D、6 2
答案:
发表评论 取消回复