网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
假设文件“a.txt”的长度为100字节,那么当正常运行语句“OutputStream f = new FileOutputStream(new File(“a.txt”));”之后,文件“a.txt”的长度变为0字节。()
参考答案
更多 “假设文件“a.txt”的长度为100字节,那么当正常运行语句“OutputStream f = new FileOutputStream(new File(“a.txt”));”之后,文件“a.txt”的长度变为0字节。()” 相关考题
考题
以下哪个命令可以正确打开文件()
A.F=open(r‘c:\windows\a.txt’)B.F=open(‘c:\windows\a.txt’)C.F=open(c:\windows\a.txt)D.F=open(rc:\windows\a.txt)
考题
某文件系统采用多级索引结构,若磁盘块的大小为512字节,每个块号需占3字节,那么根索引采用一级索引时的文件最大长度为(27)K字节;采用二级索引时的文件最大长度为(28)K字节。(54)A.85B.170C.512D.1024
考题
若要将当前盘目录下的文件A.TXT连接在文件B.TXT后面,应使用的命令为( )。A.COPY A.TXT>>B.TXTB.MOVE A.TXT>>B.TXTC.PATH A.TXT>>B.TXTD.TYPE A.TXT>>B.TXT
考题
下列打开文件的表达式中,错误的是( )。A.ofstream ofile;ofile.open("C:\\vc\\a.txt",ios::binary);B.fstream iofile;iofile.open("a.txt",ios::ate);C.ifstream ifile("C:\\vc\\a.txt");D.cout.open("C:\\vc\\s.txt",ios::binary);
考题
假设文件“a.txt”的长度为100字节,那么当正常运行语句“OutputStreamf=newFileOutputStream(newFile(“a.txt”));”之后,文件“a.txt”的长度变为0字节。( )
考题
在搜索文件/文件夹时,若用户选择通配符?A.txt,则下列被选中的文件是()。①A.txt②A1.txt③1A.txt④a1.doc⑤aA.txt
A.①③⑤B.③⑤C.①②④D.②④
考题
创建一个向文件“file.txt”追加内容的输出流对象的语句有()。A、FileOutputStream out=new FileOutputStream(“file.txt”,true);B、OutputStream out=new FileOutputStream(“file.txt”,“append”);C、OutputStream out=new FileOutputStream(“file.txt”);D、FileOutputStream out=new FileOutputStream(new file(“file.txt”));E、OutputStream out=new FileOutputStream(new File(“file.txt”),true.;
考题
Which two construct an OutputSream that appends to the file “file.txt”? ()A、 OutputStream out=new FileOutputStream(“file.txt”);B、 OutputStream out=new FileOutputStream(“file.txt”, “append”);C、 FileOutputStream out=new FileOutputStream(“file.txt”, true);D、 FileOutputStream out=new FileOutputStream(new file(“file.txt”));E、 OutputStream out=new FileOutputStream(new File(“file.txt”)true);
考题
在搜索文件/文件夹时,若用户选择通配符?A.txt,则下列被选中的文件是()。 ①A.txt ②A1.txt ③1A.txt ④aA1.txt ⑤aA.txtA、③④⑤B、①③⑤C、①②④D、③⑤
考题
Which constructs a DataOutputStream?()A、 New dataOutputStream(“out.txt”);B、 New dataOutputStream(new file(“out.txt”));C、 New dataOutputStream(new writer(“out.txt”));D、 New dataOutputStream(new FileWriter(“out.txt”));E、 New dataOutputStream(new OutputStream(“out.txt”));F、 New dataOutputStream(new FileOutputStream(“out.txt”));
考题
The file “file.txt” exists on the file system and contsins ASCII text. Given: try { File f = new File(“file.txt”); OutputStream out = new FileOutputStream(f, true); } catch (IOException) {} What is the result?()A、 The code does not compile.B、 The code runs and no change is made to the file.C、 The code runs and sets the length of the file to 0.D、 An exception is thrown because the file is not closed.E、 The code runs and deletes the file from the file system.
考题
What writes the text “ ” to the end of the file “file.txt”?()A、 OutputStream out= new FileOutputStream (“file.txt”); Out.writeBytes (“ /n”);B、 OutputStream os= new FileOutputStream (“file.txt”, true); DataOutputStream out = new DataOutputStream(os); out.writeBytes (“ /n”);C、 OutputStream os= new FileOutputStream (“file.txt”); DataOutputStream out = new DataOutputStream(os); out.writeBytes (“ /n”);D、 OutputStream os= new OutputStream (“file.txt”, true); DataOutputStream out = new DataOutputStream(os); out.writeBytes (“ /n”);
考题
单选题Which constructs a DataOutputStream?()A
New dataOutputStream(“out.txt”);B
New dataOutputStream(new file(“out.txt”));C
New dataOutputStream(new writer(“out.txt”));D
New dataOutputStream(new FileWriter(“out.txt”));E
New dataOutputStream(new OutputStream(“out.txt”));F
New dataOutputStream(new FileOutputStream(“out.txt”));
考题
判断题假设文件“a.txt”的长度为100字节,那么当正常运行语句“OutputStream f = new FileOutputStream(new File(“a.txt”));”之后,文件“a.txt”的长度变为0字节。()A
对B
错
考题
多选题创建一个向文件“file.txt”追加内容的输出流对象的语句有()。AFileOutputStream out=new FileOutputStream(“file.txt”,true);BOutputStream out=new FileOutputStream(“file.txt”,“append”);COutputStream out=new FileOutputStream(“file.txt”);DFileOutputStream out=new FileOutputStream(new file(“file.txt”));EOutputStream out=new FileOutputStream(new File(“file.txt”),true.;
考题
多选题Which two construct an OutputSream that appends to the file “file.txt”? ()AOutputStream out=new FileOutputStream(“file.txt”);BOutputStream out=new FileOutputStream(“file.txt”, “append”);CFileOutputStream out=new FileOutputStream(“file.txt”, true);DFileOutputStream out=new FileOutputStream(new file(“file.txt”));EOutputStream out=new FileOutputStream(new File(“file.txt”)true);
考题
单选题The file “file.txt” exists on the file system and contsins ASCII text. Given: try { File f = new File(“file.txt”); OutputStream out = new FileOutputStream(f, true); } catch (IOException) {} What is the result?()A
The code does not compile.B
The code runs and no change is made to the file.C
The code runs and sets the length of the file to 0.D
An exception is thrown because the file is not closed.E
The code runs and deletes the file from the file system.
热门标签
最新试卷