某程序将计算结果输出到一个有格式顺序文件中,文件名为AA.DAT,设备通道号为3,打开这个文件的语句是:()
第1题:
在当前文件夹中生成一个名为Filel.txt的文件,在D盘里生成一个名为mydir的文件夹,并在该文件夹中生成一个名为File2.txt的文件,最后输出文件File2.txt的完整路径。修改下列程序中的错误之处,使程序能够正确运行。
注意:不改动程序结构,不得增行或删行。
import java.io.*;
public class FileTest
{
public static void main(String args[])
{
File dirObject=new File(d:\\mydir);
File fileObjectl=new File(d:\\kmydir","Filel.txt");
File fileObject2=new File(d:/mydir","File2.txt");
System.out.println(fileObject2);
try
{
Dirobject.mkdir();
}catch(SecurityException e){}
try
{
fileObject1.createNewFile();
fileObject2.createNewFile();
}catch(I0Exception e){}
}
}
第2题:
若磁盘上已存全路径文件名为c:\ctest\test.txt的文件,下面语句中不能打开该文件的是( )。
A.ifstream *pFile=new ifstream("c:\\ctest\\test.txt");
B.ifstream file("c:\\ctest\\test.txt");
C.ifstream file;file.open("c:\\ctest\\test.txt");
D.ifstream file("c:\etest\test.txt");
第3题:
若磁盘上已存在某个文本文件,其全路径文件名为d:\ncre\test.txt,下列语句中不能打开该文件的是
A.ifstream file("d:\ncre\test.txt");
B.ifstream file("d:\\ncre\\test.txt");
C.ifstream file;file.open("d:\\ncre\\test.txt");
D.ifstream* pFile=new ifstream("d:\\ncre\\test.txt");
第4题:
下面程序的结果是 ______。 #include<iostream.h> class A{ public: virtual void fun()=0{}; }; class B:public A{ public: void fun () {cout<< "new file" ;} }; class C: public A{ public: void fun (){cout<<"open file"<< " " } }; class D: public A{ public: void fun () {cout<< "save file\n" ;} }; void main() { A a,*p; B b; C c; D d; p=&c; p->fun (); p=&b; p->fun (); p=&d; p->fun(); }
A.new file open file save file
B.new file new file new file
C.编译出错
D.open file new file save file
第5题:

第6题:
建立新图形文件,用过下拉式菜单的操作方式是()
第7题:
在Visual Foxpro环境下,执行下列命令: Number=""3"" File=""file""+Number use&File 当前打开的表文件的主文件名是()
第8题:
对OPEN(4,FILE=‘BB.DAT’,STATUS=‘OLD’,语句,下面哪个描述是正确的()?
第9题:
要对顺序文件进行写操作,下列打开文件语句中正确的是()
第10题:
打开一个有格式顺序文件,可以读文件
打开一个有格式直接文件,可以写文件
打开一个有格式直接文件,可以读写
打开一个直接文件
第11题:
OPEN(UNIT=3,FILE=AA.DAT,STATUS=NEW)
B.OPEN(UNIT=3,FILE=ADAT,STATUS=OLD.
C.OPEN(3,FILE=′ADAT′,STATUS=′NEW′)
D.OPEN(D,FILE=′ADAT′,STATUS=′OLD′)
第12题:
无格式顺序
有格式顺序
无格式直接
有格式直接
第13题:
下面程序的运算结果是( )。 #include<iostream> using namespace std; class A { public: virtual void fun()=0; }; class B:public A } public: void fun() {cout<<"new file"<<" ";} }; class C:public A { public: void fun() { cout<<"open file"<<" ";} }; void main() { A a, * p; B b;C c; p=&c; p->fun(); p=&b; }
A.new file open file
B.new file new file
C.编译出错
D.open file new file
第14题:
要建立文件流并打开当前目录下的文件6le.dat用于输入,下列语句中错误的是( )。
A.ifstream fin=ffstream.open(”file.dat”);
B.ifstream*fin=new ifstream(”file.dat”);
C.ifstream fin;fin.open(”file.dat”);
D.ifstream*fin=new ifstream;fin->open(”file.dat”);
第15题:
执行下列命令后,当前打开的数据库文件名是 Number="3" File="File"+Number USE &File
A.File3
B.&File
C.FileNumber
D.File
第16题:
在UNIX系统中,若文件File3的权限是414,则表示
A.文件属主可执行File3
B.文件属主可读File3
C.同组用户可读File3
D.同组用户可执行File3
E.其他用户可读File3
第17题:

第18题:
欲新建一个电路原理图文件应该执行()操作。
第19题:
创建一个向文件“file.txt”追加内容的输出流对象的语句有()。
第20题:
An application writes to a log file in the /logs filesystem that is full. After the log file is deleted, 'df' still shows the filesystem as 100% full. What is the likely cause of the problem and what will resolve it?()
第21题:
When issuing the CROSSCHECK command in RMAN, if a backup file CANNOT be found, to what status is that file set?()
第22题:
ifstream fin=ifstream.open(“file.dat”);
ifstream* fin=new ifstream(“file.dat”);
ifstream fin; fin.open(“file.dat”);
ifstream* fin=new ifstream(); fin->open(“file.dat”);
第23题:
FileOutputStream out=new FileOutputStream(“file.txt”,true);
OutputStream out=new FileOutputStream(“file.txt”,“append”);
OutputStream out=new FileOutputStream(“file.txt”);
FileOutputStream out=new FileOutputStream(new file(“file.txt”));
OutputStream out=new FileOutputStream(new File(“file.txt”),true.;