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');
举一反三
- 要在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=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");
- 以写方式打开myfile.txt文本文件,正确的选项是()。 A: fopen("myfile.txt","r"); B: fopen("myfile.txt","w"); C: fopen("myfile.txt","rb"); D: fopen("myfile.txt","wb");
内容
- 0
打开一个已经存在的非空文本文件,若文件名为stu,则正确的打开语句为() A: FILE*fp; B: fp=fopen("stu.txt","r") C: B.FILE*fp; D: fp=fopen(stu.txt,r) E: C.FILE*fp; F: fP=fopen("stu,txt","wb") G: D.FILE*fp; H: fp=fopen("stu.txt",w
- 1
若要用只读方式打开d:\a.txt文件,则需要执行() A: FILE *fp;fp=fopen(d:\a.txt,r); B: FILE *fp;fp=fopen(d:\\a.txt,r); C: FILE *fp;fp=fopen(d:\a.txt,r+); D: FILE *fp;*fp=fopen(d:\a.txt,w)
- 2
以只读方式打开一个已存在的文本文件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+");
- 3
以只读方式打开一个已存在的文件文本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+”);
- 4
以二进制只读方式打开一个已有的文本文件file1,正确调用fopen函数的方式是() A: FILE*fp;fp=fopen("file1","rb"); B: FILE*fp;fp=fopen("file1","r+"); C: FILE*fp;fp=fopen("file1","r"); D: FILE*fp;fp=fopen("file1","rb+");