B、!outf或者outf.good()
C、outf或者outf.fail()
D、outf或者outf.good()
第1题
A.outfile.fail()或outffle
B.outfile.good()或!outfile
C.outfile.good()或outfile
D.outfile.fail()或!outfile
第2题
A.outfile.fail()或outfile
B.outfile.good()或!outfile
C.outfile.good()或outfile
D.outfile.fail()或!outfile
第3题
(A)ofstreamfs("date.dat",ios::trunc);
(B)ifstreamfs("date.dat",ios::trunc);
(C)ofstreamfs("date.dat",ios::out);
(D)ifstreamfs("date.dat",ios::in);
第5题
void test(ifstream&outf,ofstream&outC) {
char c;
while(______){
______;
if(c=='\n')outc.put(C) ;
}
}
下划线处缺失的代码是( )。
A.outf.put(C) 与outc.get(C)
B.outf.put(C) 与outc.get(C)
C.outf.get(C) 与outc.put?
D.outf.get(C) 与outc.put?
第7题
A、ofstream outfile("f1.dat");
B、ofstream outfie; outfile.open("f1.dat");
C、ifstream outfile("f1.dat");
D、fstream outfile("f1.dat",ios::out);
第9题
A.对象infile只能用于文件输入操作
B.对象outfile只能用于文件输出操作
C.对象iofile在文件关闭后,不能再打开另一个文件
D.对象iofile可以打开一个文件同时进行输入和输出
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!