单选题对OPEN(4,FILE=‘BB.DAT’,STATUS=‘OLD’,语句,下面哪个描述是正确的()?A打开一个有格式顺序文件,可以读文件B打开一个有格式直接文件,可以写文件C打开一个有格式直接文件,可以读写D打开一个直接文件

单选题
对OPEN(4,FILE=‘BB.DAT’,STATUS=‘OLD’,语句,下面哪个描述是正确的()?
A

打开一个有格式顺序文件,可以读文件

B

打开一个有格式直接文件,可以写文件

C

打开一个有格式直接文件,可以读写

D

打开一个直接文件


参考解析

解析: 语句中STATUS=‘OLD’表明是一个已存在的老文件,打开后可顺序读取。

相关考题:

( 16 )要建立文件流并打开当前目录下的文件 file.dat 用于输入,下列语句中错误的是A ) ifstream fin=ifstream.open ( "file.dat" ) ;B ) ifstream*fir.=new ifstream ( "file.dat" ) ;C ) ifstream fin; fin.open ( "file.dat" ) ;D ) ifstream *fin=new ifstream ( ) ; fin 一 open ( "file.dat" ) ;

下面程序的预设功能是:统计文件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();}则程序中空白处应该填入的语句是【 】。

下面关于文件操作的代码可能触发异常()file, err := os.Open("test.go")defer file.Close()if err != nil { fmt.Println("open file failed:", err) return}... 此题为判断题(对,错)。

下面哪种方法读文件“input.txt”是正确的()。 A、in_file = open('input.txt','w')B、in_file = open('input.txt',r)C、in_file = open('input.txt','r')D、都不正确

下面程序的运算结果是()。includeusing namespace std;class A{public:virtual void f 下面程序的运算结果是( )。 #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 fileB.new file new fileC.编译出错D.open file new file

若磁盘上已存全路径文件名为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");

要建立文件流并打开当前目录下的文件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”);

为丫从当前文件夹中读入文件File1.txt,某人编写了下面的程序: Private Sub Command1_Click( ) Open"File1.txt"For Output As#20 Do While Not EOF(20) Line Input#20,ch$ Print ch Loop Close#20 End Sub 程序调试时,发现有错误,下面的修改方案中正确的是( )。A.在Open语句中的文件名前添加路径B.把程序中各处的“20”改为“1”C.把Print ch语句改为Print#20,chD.把Open语句中的0utput改为Input

下列可以打开随机文件的语句是( )。A.Open"file 1.dat"For Input As#1B.Open"file1.dat"For Append As#1C.Open"file1.dat"For Output As#1D.Open"file1.dat"For Randow As#1 Len=20

下面程序的结果是 ______。includeclass A{ public:virtual voidfun()=0{};};class 下面程序的结果是 ______。 #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 fileB.new file new file new fileC.编译出错D.open file new file save file

(24)假定用下面的语句打开文件:Open"File l .txt"For Input As#1则不能正确读文件的语句是A)Input # 1, ch$B)Line Input # 1, ch$C)ch$=Input$(5, # 1)D)Read # 1, ch$

(34)为了从当前文件夹中读入文件File l .txt,某人编写了下面的程序:Private Sub Command 1_CLick()Open"File l .txt" For Output As #20Do While Not EOF(20)Line Input #20, ch$Print chLoopClose #20End Sub程序调试时,发现有错误,下面的修改方案中正确的是A)在Open语句中的文件名前添加路径B)把程序中各处的"20"改为"1"C)把Print ch语句改为Print #20, chD )把Open语句中的Output改为Input

阅读FORTAN程序:OPEN(8,FILE=FILE2.DAT,STATUS:NEW)DO10I=1>3WRITE(8,(4I4))(J+I,J=1,4)10CONTINUECLOSEC8)END程序运行后,数据文件FIFE2.DAT的内容是:

阅读FORTRAN程序:OPEN(8,FILE=FILE2 DAT,STATUS=NEW)DO 10 I=1,3WEITE(8,(4I4)JI+I,J=1,4)10 CONTINUECLOSE(8)END程序运行后,数据文件FILE2,DAT的内容是:

下面哪个函数可以打开一个文件,以对文件进行读和写操作?()A、fget()B、file_open()C、fopen()D、open_file()

对OPEN(4,FILE=‘BB.DAT’,STATUS=‘OLD’,语句,下面哪个描述是正确的()?A、打开一个有格式顺序文件,可以读文件B、打开一个有格式直接文件,可以写文件C、打开一个有格式直接文件,可以读写D、打开一个直接文件

某程序将计算结果输出到一个有格式顺序文件中,文件名为AA.DAT,设备通道号为3,打开这个文件的语句是:()A、OPEN(UNIT=3,FILE=AA.DAT,STATUS=NEW)B、B.OPEN(UNIT=3,FILE=ADAT,STATUS=OLD.C、C.OPEN(3,FILE=′ADAT′,STATUS=′NEW′)D、D.OPEN(D,FILE=′ADAT′,STATUS=′OLD′)

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?()A、The deleted file is still open by the application.The system must be rebooted before'df' will show the reduction in the filesystem.B、The deleted file is still open by the application.The application must be stoppedbefore 'df' will show the reduction in the filesystem.C、The filesystem is still marked as full in the /etc/fs.status file.The system must be rebooted before 'df' will show the reduction in the filesystem.D、The filesystem is still marked as full in the /etc/fs.status file.The application must be stopped before 'df' will show the reduction in the filesystem.

要对顺序文件进行写操作,下列打开文件语句中正确的是()A、Open“file1.txt”ForBinaryAs#1B、Open“file1.txt”ForRandomAs#1C、Open“file1.txt”ForInputAs#1D、Open“file1.txt”ForOutputAs#1

以下存在语法错误的OPEN语句是哪一条?()A、OPEN(8)B、OPEN(8,FORM=‘UNFORMATTED’)C、OPEN(8,ACCESS=‘DIRECT’)D、OPEN(8,FILE=‘AA’)

The listener has shut down unexpectedly. You want to view the listener log file and listener trace file to find the cause of the problem. How can you view the contents of the listener log file and the listener trace file?()A、 Open the file at the location specified by the BACKGROUND_DUMP_DEST parameter in the pfile.B、 Open the file at the location specified by the USER_DUMP_DEST parameter in the pfile.C、 Issue the SERVICES command at the LSNRCTL prompt.D、 Issue the STATUS command at the LSNRCTL prompt.

单选题下面哪个函数可以打开一个文件,以对文件进行读和写操作?()Afget()Bfile_open()Cfopen()Dopen_file()

单选题要建立文件流并打开当前目录下的文件file.dat用于输入,下列语句中错误的是(  )。Aifstream fin=ifstream.open(“file.dat”);Bifstream* fin=new ifstream(“file.dat”);Cifstream fin; fin.open(“file.dat”);Difstream* fin=new ifstream(); fin-open(“file.dat”);

单选题有程序:ADD(X,Y)=X**2+YOPEN(8,FILE=‘F’,STATUS=‘NEW’,ACCESS=‘DIRECT’,*FORM=‘UNFORMATTED’,REAL=16DO10I=1,4D=ADD(REAL(I),2、0)WRITE(8,REC=I)D10CONTINUECLOSE(8)OPEN(2,FILE=‘F’,STATUS=‘OLD’,ACCESS=‘DIRECT’,*FORM=‘UNFORMATTFED’,REAL=6DO20I=2,4,2READ(2,REC=I)CWRITE(*,30)C20CONTINUE20FORMAT(1x,F4.1)CLOSE(2)END执行此程序的结果是:()A3.0;11.0B6.0;11.0C6.0;18.0D11.0;18.0

单选题对OPEN(4,FILE=‘BB.DAT’,STATUS=‘OLD’,语句,下面哪个描述是正确的()?A打开一个有格式顺序文件,可以读文件B打开一个有格式直接文件,可以写文件C打开一个有格式直接文件,可以读写D打开一个直接文件

单选题某程序将计算结果输出到一个有格式顺序文件中,文件名为AA.DAT,设备通道号为3,打开这个文件的语句是:()AOPEN(UNIT=3,FILE=AA.DAT,STATUS=NEW)BB.OPEN(UNIT=3,FILE=ADAT,STATUS=OLD.CC.OPEN(3,FILE=′ADAT′,STATUS=′NEW′)DD.OPEN(D,FILE=′ADAT′,STATUS=′OLD′)

单选题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?()AThe deleted file is still open by the application.The system must be rebooted before'df' will show the reduction in the filesystem.BThe deleted file is still open by the application.The application must be stoppedbefore 'df' will show the reduction in the filesystem.CThe filesystem is still marked as full in the /etc/fs.status file.The system must be rebooted before 'df' will show the reduction in the filesystem.DThe filesystem is still marked as full in the /etc/fs.status file.The application must be stopped before 'df' will show the reduction in the filesystem.

单选题The listener has shut down unexpectedly. You want to view the listener log file and listener trace file to find the cause of the problem. How can you view the contents of the listener log file and the listener trace file?()A Open the file at the location specified by the BACKGROUND_DUMP_DEST parameter in the pfile.B Open the file at the location specified by the USER_DUMP_DEST parameter in the pfile.C Issue the SERVICES command at the LSNRCTL prompt.D Issue the STATUS command at the LSNRCTL prompt.