要在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");
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");
举一反三
- 要在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");
- 要在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");
- 要在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");
- 若有定义FILE *fp; 以“只读”方式打开文件C:\test\myfile.txt的正确语句是 A: fp = fopen("C:\test\myfile.txt","r"); B: fp = fopen("C:\\test\\myfile.txt","r"); C: fp = fopen("C:\test\myfile.txt",'r'); D: fp = fopen("C:\\test\\myfile.txt",'r');
- 以只读方式打开一个已存在的文本文件ab.txt,以下选项中正确的是______。A. FILE *fp;fp=fopen("ab.txt","a");B. FILE *fp;fp=fopen("ab.txt","w");C. FILE *fp;fp=fopen("ab.txt","r");D. FILE *fp;fp=fopen("ab.txt","rb+"); A: FILE *fp;fp=fopen("ab.txt","a"); B: FILE *fp;fp=fopen("ab.txt","w"); C: FILE *fp;fp=fopen("ab.txt","r"); D: FILE *fp;fp=fopen("ab.txt","rb+");