fopen("A:/user/abC.txt","r")
fopen("A://user//abC.txt","r+")
fopen("A:/user/abC.txt","rb")
D.fopen("A://user//abtxt","w")
第1题:
以下程序试图把从终端输入的字符输出到名为abc.txt的文件中,直到从终端读入字符串#号时结束输入和输出操作,但程序有错 #include<stdio.h> main() { FILE*fout; char ch; fout=fopen('abc.txt','w'); ch=fgetc(stdin); while(ch!='#') { fputc(ch,four); ch=fgetc(stdin); } fclose(fout); } 出错的原因是______。
A.函数fopen调用形式错误
B.输入文件没有关闭
C.函数fgetc调用形式错误
D.文件指针stdin没有定义
第2题:
若要打开A盘上user了目录下名为abc.txt的文本文件进行读、写操作,下面符合此要求的函数调用是
A.fopen("A:\user\abc.txt",","r")
B.fopen("A:\\user\\abc.txt","r+")
C.fopen("A:\user\abc.txt","rb")
D.fopen("A:\\user\\abc.txt","w")
第3题:
若要打开A盘上user子目录下名为abc.txt的文本文件进行读、写操作,下面符合此要求的函数调用是
A.fopen(“A:\user\abc.txt”,“r”)
B.fopen(“A:\\user\\abc.txt”,“r+”)
C.fopen(“A:\user\abc.txt”,“rb”)
D.fopen(“A:\user\\abc.txt”,“w”)
第4题:
A.fp=fopen(“w 1.dat”,“r+”);
B.fp=fopen(“w 1.dat”,“w+”);
C.fp=fopen(“E:\\w 1.dat”,“r+”);
D.fp=fopen(“E:\\w 1.dat”,“w+”);
第5题:
若需要打开一个已经存在的非空文件“FILE”,并对其进行修改,正确的打开语句是()。
第6题:
在J2EE中,利用下列构造函数准备对文件abc.txt操作,但文件abc.txt在当前目录不存在,不会产生运行时错误的是()。
第7题:
如果要删除C盘FOX子目录下的USER子目录,应该如何操作()
第8题:
下列打开文件的表达式中,()是错误的。
第9题:
若要打开:A盘上user子目录下名为abc.txt的文本文件进行读、写操作,下面符合此要求的函数调用是()。
第10题:
BufferedReader breader=new BufferedReader(new FileReader(abc.txt));
PrintWriter out = new PrintWriter(new FileWriter(“abc.txt”),true);
FileInputStream fin = new FileInputStream(“abc.txt”);
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(“abc.txt”));
第11题:
fp=fopen(“FILE”, “r+”);
fp=fopen(“FILE”, “r”);
fp=fopen(“FILE”, “ab+”);
fp=fopen(“FILE”, “w+”);
第12题:
fp=fopen(“file”,“r”);
fp=fopen(“file”,“ab+”);
fp=fopen(“file”,“w+”);
fp=fopen(“file”,“r+”);
第13题:
若要打开A盘中user子目录下名为aaa.txt的文本文件进行读、写操作,下面符合此要求的函数调用是( )
A.fopen("A:\user\aaa.txt","r")
B.fopen("A:\\user\\aaa.txt","r+")
C.fopen("A:\user\aaa.txt","rb")
D.fopen("A:\\user\\aaa.txt","w")
第14题:
若要打开A盘中user子目录下名为aaa.txt的文本文件进行读、写操作,下面符合此要求的函数调用是( )。
A.fopen("A:\user\aaa.txt","r")
B.fopen("A:\\user\\aaa.txt","r=")
C.fopen("A:\user\aaa.txt","rb")
D.fopen("A:\\user\\aaa.txt","w")
第15题:
当需要打开A盘上的abc.txt 文件用于输入时,则定义文件流对象的语句为______ 。
A.fstream fin(“A: abc.txt”);
B.ofstream fin (“A: abc.txt”);
C.ifstream fin(“A: abc.txt”,ios:: app);
D.ifstream fin(“A: abc.txt”,ios:: nocreate);
第16题:
若需要打开一个已经存在的非空文件“file”并进行修改,则正确的打开语句是()。
第17题:
为读而打开文本文件aa.dat,的正确写法是()
第18题:
为写而打开文本文件aa.dat,的正确写法是()
第19题:
已知文本文件abc.txt,以读方式打开,下列的操作中错误的是()。
第20题:
以下可作为函数fopen中第一个参数的正确格式是()
第21题:
fopen("A:/user/abC.txt","r")
fopen("A://user//abC.txt","r+")
fopen("A:/user/abC.txt","rb")
D.fopen("A://user//abtxt","w")
第22题:
fstreaminfile("abc.txt",ios::in)
ifstreaminfile("abc.txt")
ofstreaminfile("abc.txt")
fstreaminfile;infile.open("abc.txt",ios::in)
第23题:
fopen(A://user//abc.txt,r)
fopen(A://user//abc.txt,r+)
fopen(A://user//abc.txt,rb)
fopen(A://userl//abc.txt,w)
第24题: