对OPEN(4,FILE=‘BB.DAT’,STATUS=‘OLD’,语句,下面哪个描述是正确的()?
第1题:
A、in_file = open('input.txt','w')
B、in_file = open('input.txt',r)
C、in_file = open('input.txt','r')
D、都不正确
第2题:
要建立文件流并打开当前目录下的文件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”);
第3题:
( 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" ) ;
第4题:
下面哪个函数可以打开一个文件,以对文件进行读和写操作?()
第5题:
第6题:
有以下程序:
include <iostream.h>
include <fstream.h>
include <stdlib.h>
int main()
{
fstream filel,file2;
char line[100];
filel.open("source.txt",ios::in);
if(!file1)
{
cout<<"Can't open file source.txt!"<<end1;
abort();
}
file2.open("dest.txt",ios::out);
if(!file2)
{
cout<<"Can't open file dest.txt!"<<end1;
abort();
}
while(!file1.eof())
{
filel.getline(1ine,100);
file2<<line;
file2<<end1;
}
filel.close();
file2.close();
return 0;
}
此程序实现的功能是【 】。
第7题:
下列可以打开随机文件的语句是( )。
A.Open"file 1.dat"For Input As#1
B.Open"file1.dat"For Append As#1
C.Open"file1.dat"For Output As#1
D.Open"file1.dat"For Randow As#1 Len=20
第8题:
此题为判断题(对,错)。
第9题:
第10题:
某程序将计算结果输出到一个有格式顺序文件中,文件名为AA.DAT,设备通道号为3,打开这个文件的语句是:()