当使用ofstream流类定义一个流对象并打开一个磁盘文件时,文件的默认打开方式为( )。

admin2020-11-11  28

问题 当使用ofstream流类定义一个流对象并打开一个磁盘文件时,文件的默认打开方式为(    )。

选项 A、ios base::in
B、ios_base::binary
C、ios_base::inlios_base::out
D、ios__base::out

答案D

解析 对于ofstream,默认的打开方式是ios_base::out,ofstream只能用于输出,它没有提供任何用于输入的操作。
转载请注明原文地址:https://kaotiyun.com/show/LYyp777K
0

相关试题推荐
最新回复(0)