要在D盘MyDir目录下新建一个MyFile.txt文件用于写,正确的语句是( )。
A. FILE *fp=fopen("D:\MyDir\MyFile.txt","W");
B. FILE *fp; fp=fopen("D:\\MyDir\\MyFile.txt","W");
C. FILE *fp; fp=fopen("D:\MyDir\MyFile.txt","r");
D. FILE *fp; fp=fopen("D:\\MyDir\\MyFile.txt","r");
下面程序运行后的结果是( )。#includeint main(){ FILE *fp; int i,m=9,n=9; fp=fopen("d:\\test.txt","w"); for(i=0;i<5;i++)fprintf(fp,"%d",i); fclose(fp); fp=fopen("d:\\test.txt","r"); fscanf(fp,"%d%d",&m,&n); fclose(fp); printf("m=%d,n=%d\n",m,n); return 0;}
A. m=1,n=2
B. m=9,n=9
C. m=1234,n=9
D. m=1,n=234