网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
二进制数据文件流fdat读指针移到文件头的语句是()
- A、fdat.seekg(0,ios::beg);
- B、fdat.tellg(0,ios::beg);
- C、fdat.seekp(0,ios::beg);
- D、fdat.tellp(0,ios::beg);
参考答案
更多 “二进制数据文件流fdat读指针移到文件头的语句是()A、fdat.seekg(0,ios::beg);B、fdat.tellg(0,ios::beg);C、fdat.seekp(0,ios::beg);D、fdat.tellp(0,ios::beg);” 相关考题
考题
要求打开文件d:\file.dat,可写入数据,正确的语句是()。
A.ifstreaminfile("d:\file.dat",ios::in);B.ifstreaminfile("d:\\file.dat",ios::in);C.ofstreaminfile("d:\file.dat",ios::out);D.fstreaminfile("d:\\file.dat",ios::in|ios::out);
考题
当使用ofstream流类定义一个流对象并打开一个磁盘文件时,文件的默认打开方式为( )。A.ios base::inB.ios_base::binaryC.ios base::in|ios base::outD.ios base::out
考题
已知outfile是一个输出流对象,要想将outfile的文件指针定位到当前位置之前321字节处,正确的函数调用语句是A.outfile.seekp(321,ios_base::cur);B.outfile.seekp(321,ios_base::bge);C.outfile.seekp(-321,ios_base::beg);D.outfile.seekp(-321,ios_base::cur);
考题
( 26 )当使用 ifstream 流类定义一个流对象并打开一个磁盘文件时,文件的默认打开方式为A ) ios_base::inB ) ios_base::in|ios_base::outC ) ios_base::outD ) ios_base::inios_base::out
考题
( 34 )打开文件时可单独或组合使用下列文件打开模式① ios_base::app ② ios_base::binary③ ios_base::in ④ ios_base::out若要以二进制读方式打开一个文件,需使用的文件打开模式为A ) ①③B ) ①④C ) ②③D ) ②④
考题
要想以读方式打开文件“D:\File.txt”,以下不能实现目的的语句是()。A、ifstreaminf("D:\\FilEtxt",ios::in);B、ifstreaminf("D:\\File.txt");C、ofstreaminf("D:\\File.txt",ios::out);D、fstreaminf("D:\\File.txt",ios::in|ios::out);
考题
已知outfile 是一个输出流对象,要想将outfile 的文件指针定位到当前位置之前321字节处,正确的函数调用语句是______ 。A.outfile.seekp (321, ios_ base:: cur);B.outfile.seekp (321,ios_ base:: beg);C.outfile.seekp (-321,ios_ base:: beg);D.outfile.seekp (-321,ios_ base:: cur);
考题
当使用fstream流类定义一个流对象并打开一个磁盘文件时,文件的隐含打开方式为( )。 A.ios::inS
当使用fstream流类定义一个流对象并打开一个磁盘文件时,文件的隐含打开方式为( )。A.ios::inB.ios::0utC.ios::in I ios::0utD.以上都不对
考题
在下列枚举符号中,用来表示“相对于当前位置”文件定位方式的是( )。A.ios_base::curB.ios_base::begC.ios_base::0utD.ios_base::end
考题
打开文件时可单独或组合使用下列文件打开模式: ①ios_base::aop ②ios_base::binary ③ios_base:: ④ios_base::out 若要以二进制读方式打开一个文件,需使用的文件打开模式为( )。A.①③B.①④C.②③D.②④
考题
这个c++程序中char city[20]; 的作用是什么 ?
#includefstream#includeiostreamusingnamespacestd;intmain(){fstreaminout;inout.open("city.txt",ios::out);inout"Dallas""""tonghua""""长春""";inout.close();inout.open("city.txt",ios::app|ios::out);inout"罗马""""巴黎""";inout.close();charcity[20];inout.open("city.txt",ios::in);while(!inout.eof()){inoutcity;coutcity"";}inout.close();system("PAUSE");return0;}
考题
在ios base类中定义了3个用于文件流定位的枚举常量,下列枚举常量不属于此类的是( )。A.ios_ase::begB.ios_base::curC.ios_base::endD.ios_base::ate
考题
当使用ifstream流类定义一个流对象并打开一个磁盘文件时,文件的默认打开方式为( )。A.ios—base::inB.ios—base::in l ios base::0utC.los base;:0utD.ios_base::inios_base::0ut
考题
哪个命令用于将IOS备份到网络中的TFTP服务器?()
A.transfer IOS t0 172.16.10.1B.copy run startC.copy tftp flashD.copy start tftpE.copy flash tftp
考题
Policy -Based Routing (PBR) has been enabled on Router R1's interfa ce F0/0. Which of the following is true regarding how PBR works?()
A. Packets entering F0/0 will be compared based on the PBR route map.B. Packets exiting F0/0 will be compared based on the PBR route map.C. IOS ignores the PBR forwarding directions wh en the packet matches a route map deny clause.D. IOS ignores the PBR forwarding directions when the packet matches a route map permit clause.
考题
函数DIFF(‘A’)代表()。A、等价于VAL(‘A’,END)+A的回零后值-A的回零前值-VAL(‘A’,BEG)B、等价于VAL(‘A’,END)+A的回零后值+A的回零前值+VAL(‘A’,BEG)C、等价于VAL(‘A’,END)-A的回零后值-A的回零前值+VAL(‘A’,BEG)D、等价于VAL(‘A’,END)-A的回零后值+A的回零前值-VAL(‘A’,BEG)
考题
能实现删除文件功能的语句是()A、ofstream fs("date.dat",ios::trunc);B、ifstream fs("date.dat",ios::trunc);C、ofstream fs("date.dat",ios::out);D、ifstream fs("date.dat",ios::in);
考题
在下列选项中,用于清除基数格式位设置以十六进制数输出的语句是()。A、cout<<setf(ios::dec,ios::basefield);B、cout<<setf(ios::hex,ios::basefield);C、cout<<setf(ios::oct,ios::basefield);D、cin>>setf(ios::hex,ios::basefield);
考题
已知:ifstreaminput;下列写出的语句中,将input流对象的读指针移到距当前位置后(文件尾方向)100个字节处的语句是()。A、input.seekg(100,ios::beg)B、input.seekg(100,ios::cur)C、input.seekg(−100,ios::cur)D、input.seekg(100,ios::end)
考题
BSC与MSCe/MGW、PDSN、PCF之间的A接口,符合()规范定义,向后与()兼容。A、IOS2.0,IOS1.*B、IOS3.0,IOS2.*C、IOS4.0,IOS3.*D、IOS5.0,IOS4.*
考题
单选题二进制数据文件流fdat读指针移到文件头的语句是()A
fdat.seekg(0,ios::beg);B
fdat.tellg(0,ios::beg);C
fdat.seekp(0,ios::beg);D
fdat.tellp(0,ios::beg);
考题
单选题能实现删除文件功能的语句是()A
ofstream fs(date.dat,ios::trunc);B
ifstream fs(date.dat,ios::trunc);C
ofstream fs(date.dat,ios::out);D
ifstream fs(date.dat,ios::in);
考题
单选题已知:ifstreaminput;下列写出的语句中,将input流对象的读指针移到距当前位置后(文件尾方向)100个字节处的语句是()。A
input.seekg(100,ios::beg)B
input.seekg(100,ios::cur)C
input.seekg(−100,ios::cur)D
input.seekg(100,ios::end)
考题
单选题在下列选项中,用于清除基数格式位设置以十六进制数输出的语句是()。A
cout<<setf(ios::dec,ios::basefield);B
cout<<setf(ios::hex,ios::basefield);C
cout<<setf(ios::oct,ios::basefield);D
cin>>setf(ios::hex,ios::basefield);
热门标签
最新试卷