网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
多选题
在J2EE中,利用下列构造函数准备对文件abc.txt操作,但文件abc.txt在当前目录不存在,不会产生运行时错误的是()。
A
BufferedReader breader=new BufferedReader(new FileReader(abc.txt));
B
PrintWriter out = new PrintWriter(new FileWriter(“abc.txt”),true);
C
FileInputStream fin = new FileInputStream(“abc.txt”);
D
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(“abc.txt”));
参考答案
参考解析
解析:
暂无解析
更多 “多选题在J2EE中,利用下列构造函数准备对文件abc.txt操作,但文件abc.txt在当前目录不存在,不会产生运行时错误的是()。ABufferedReader breader=new BufferedReader(new FileReader(abc.txt));BPrintWriter out = new PrintWriter(new FileWriter(“abc.txt”),true);CFileInputStream fin = new FileInputStream(“abc.txt”);DOutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(“abc.txt”));” 相关考题
考题
下列打开文件的表达式中,错误的是( )。A.ofstream ofile;ofile.open("C:\\vc\LabC.txt",ios::binary);B.fstream iofile;iofile.open("abC.txt",ios::ate);C.ifstream ifile("C:\\vc\abC.txt");D.cout.open("C:\\vc\abC.txt",ios::binary);
考题
下面程序的预设功能是:统计文件abc.txt中的字符个数。 include include
下面程序的预设功能是:统计文件abc.txt中的字符个数。include <iostream.h>include <fstream.h>include <stdlib.h>void main(){fstream file;file.open( "abc.txt", ios::in);if ( !file ){cout<<"Can not open abc.txt"<<end1;abort();}char ch;int i = O;while (______________){file.get(ch);i++;}cout<<"Characters : "<<i<<end1;file.close();}则程序中空白处应该填入的语句是【 】。
考题
下列InputStream构造方法正确的是()。
A、InputStream in=new FileReader(“file.txt”)B、InputStream in=new FileInputStream(“file.txt”)C、InputStream in=new InputStreamFileReader (“file.txt”,“read”)D、FileInputStream in=new FileReader(new File(“file.txt”))
考题
下列打开文件的表达式中,错误的是( )。A.ofstream ofile; ofile.open("C:\\vc\\abc.txt",ios: :binary);B.fstream iofile; iofile.open("abc.txt",ios::ate);C.ifstream ifile("C:\\vc\\abc.txt");D.cout.open("C:\\vc\\abc.txt",ios: :binary);
考题
下列打开文件的表达式中,错误的是A.ofstream ofile;ofile.open("C:\\vc\\abc.txt",ios::binary);B.fstream iofile;iofile.open("abc.txt",ios::ate);C.ifstream ifile("C:\\vcXXabc.txt");D.cout.open("C:\\vc\\abc.txt",ios::binary);
考题
若要打开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")
考题
当需要打开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);
考题
下面()命令能在屏幕上显示当前盘当前目录下文件名为ABC.TXT的文件内容。ATYPEABC.TXTCONBTYPEABC.TXTCCOPYABC.TXTCONDCOPYABC.TXT
考题
下列说法正确的是()A、diltree命令可以删除子目录下所有的文件和子目录B、copy A:/命令可以把a盘根目录下的所有文件拷贝到当前目录下C、用format目录格式化后的磁盘不能恢复D、dir c:/abc.txt/s 命令可以在整个c盘搜索abc.txt
考题
在J2EE中,以下各项中,()正确阐述了创建inputstreamreader的方式 A、new InputStreamReader(new FileInputStream(“data”))B、new InputStreamReader (new FileReader(“data”))C、new InputStreamReader (new BufferedReader(“data”))D、new InputStreamReader ( “data”)
考题
在J2EE中,下面代码中,()不会编译错误。 A、File f = new File("/","autoexec.bat");B、DataInputStream din = new DataInputStream(new FileInputStream("autoexec.bat"));C、InputStreamReader in = new InputStreamReader(System.in);D、OutputStreamWriter out = new OutputStreamWriter(System.in);
考题
在J2ee中,以下各项中,()正确阐述了创建InputStreamReader的方式。 A、new InputStreamReader(new FileInputStream("data"));B、new InputStreamReader(new FileReader"data"));C、new InputStreamReader(new BufferedReader("data"));D、new FileInputStream("data")
考题
在J2EE中,利用下列构造函数准备对文件abc.txt操作,但文件abc.txt在当前目录不存在,不会产生运行时错误的是()。 A、BufferedReader breader=new BufferedReader(new FileReader("abc.txt"));B、PrintWriter out = new PrintWriter(new FileWriter(“abc.txt”),true);C、FileInputStream fin = new FileInputStream(“abc.txt”);D、OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(“abc.txt”));
考题
已知文本文件abc.txt,以读方式打开,下列的操作中错误的是()。A、fstreaminfile("abc.txt",ios::in)B、ifstreaminfile("abc.txt")C、ofstreaminfile("abc.txt")D、fstreaminfile;infile.open("abc.txt",ios::in)
考题
下列打开文件的表达式中,()是错误的。A、ofstream ofile;ofile.open("abc.txt",ios::binary);B、fstream iofile;iofile.open("abc.txt",ios::ate);C、ifstream ifile("abc.txt");D、cout.open("abc.txt",ios::binary);
考题
若要打开: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://userl//abc.txt","w")
考题
Which two create an InputStream and open file the “file.txt” for reading? ()A、 InputStream in=new FileReader(“file.txt”);B、 InputStream in=new FileInputStream(“file.txt”);C、 InputStream in=new InputStreamFileReader (“file.txt”, “read”);D、 FileInputStream in=new FileReader(new File(“file.txt”));E、 FileInputStream in=new FileInputStream(new File(“file.txt”));
考题
单选题若要打开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
D.fopen("A://user//abtxt","w")
考题
单选题在J2EE中,以下各项中,()正确阐述了创建inputstreamreader的方式A
new InputStreamReader(new FileInputStream(“data”))B
new InputStreamReader (new FileReader(“data”))C
new InputStreamReader (new BufferedReader(“data”))D
new InputStreamReader ( “data”)
考题
单选题在J2ee中,以下各项中,()正确阐述了创建InputStreamReader的方式。A
new InputStreamReader(new FileInputStream(data));B
new InputStreamReader(new FileReaderdata));C
new InputStreamReader(new BufferedReader(data));D
new FileInputStream(data)
考题
单选题下面()命令能在屏幕上显示当前盘当前目录下文件名为ABC.TXT的文件内容。A
TYPEABC.TXTCONB
TYPEABC.TXTC
COPYABC.TXTCOND
COPYABC.TXT
考题
单选题下列打开文件的表达式中,()是错误的。A
ofstream ofile;ofile.open(abc.txt,ios::binary);B
fstream iofile;iofile.open(abc.txt,ios::ate);C
ifstream ifile(abc.txt);D
cout.open(abc.txt,ios::binary);
考题
多选题在J2EE中,下面代码中,()不会编译错误。AFile f = new File(/,autoexec.bat);BDataInputStream din = new DataInputStream(new FileInputStream(autoexec.bat));CInputStreamReader in = new InputStreamReader(System.in);DOutputStreamWriter out = new OutputStreamWriter(System.in);
热门标签
最新试卷