首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
当使用ofstream流类定义一个流对象并打开一个磁盘文件时,文件的默认打开方式为( )。
当使用ofstream流类定义一个流对象并打开一个磁盘文件时,文件的默认打开方式为( )。
admin
2020-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
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
请使用VC6或使用【答题】菜单打开考生文件夹proj3下的工程pmj3,其中声明了一个单向链表类sList。sLst的成员函数Prepend的功能是在链表头部加入一个新的元素。请编写成员函数Prepend。在main函数中给出了一组测试数据,此时程序的输出
请使用VC6或使用【答题】菜单打开考生文件夹proj3下的工程proj3,其中包含主程序文件main.cpp和用户定义的头文件Array.h,整个程序包含有类Array的定义和主函数main的定义。请把主程序文件中的Array类的成员函数Contrary(
请使用VC6或使用【答题】菜单打开考生文件夹projl下的工程pmjl,此工程包含—个源程序文件projl.cpp。其中位于每个注释“//ERROR****found*****”之后的一行语句存在错误。请改正这些错误,使程序的输出结果为:Youarer
请使用VC6或使用【答题】菜单打开考生文件夹proj3下的工程pmj3,其中定义了MyString类,一个用于表示字符串的类。成员函数reverse的功能是将字符串进行“反转”。例如,将字符串ABCDEF“反转”后,得到字符串FEDCBA;将字符串ABCD
有如下程序:#include<iostream>usingnamespacestd;classMusic{public:voidsetTifle(char*str){strcpy(title,str
请使用VC6或使用【答题】菜单打开考生目录proj3下的工程文件proj3,此工程包含一个源程序文件proj3.cpp,其中定义了用于表示二维向量的类MyVector;程序应当显示(6,8)。但程序中有缺失部分,请按照以下提示,把缺失部分补充完整:
请使用VC6或使用【答题】菜单打开考生文件夹proj2下的工程proj2,该工程中含有一个源程序文件pmj2.cpp,其中定义了CharShape类、Triangle类和Rectangle类。CharShape是一个抽象基类,它表示由字符组成的图
下面程序的运行结果为()。#include<iostream.h>voidmain(){for(inta=0,x=0;!x&&a<=10;a++){a++;}cout<<a<<endl;}
使用VC6打开考生文件夹下的源程序文件modi3.cpp,要求编写一个CMyShape类,含有求面积求周长等纯虚函数。然后编写一个CMyRectangle类和CMyCircle类继承CMyShape,并实现求面积、求周长的两个函数。在main()i~数中测
下列字符串中,不可以用作C++标识符的是
随机试题
雨天安全行车的注意事项是什么?
呼吸道具有
中国目前房地产代理活动的主要形式为()。
施工方案经济分析的常用方法是什么?设备负荷试运转应怎样来组织?
当无圈梁和梁垫时,板、次梁与主梁交叉处,其上层钢筋的绑扎位置正确的是()。
在运用控制小组进程技巧时,工作者要针对组员的语言行为及背后的思想适当给出解释,这样做的目的是()。
阅读《济南的冬天》的教学实录片段,回答问题。(总结部分)师:现在我们已经领略了济南这个城市冬天的美妙了,最后让我们一起来总结一下这篇文章每一段的主旨。谁能告诉我,第一段主要写了什么?生:写了济南作为一个北方城市却能拥有一个温暖
我国古代“皇帝”作为国家元首的正式称号,始于()。
公安工作是政策性和法律性相结合的一项工作。()
Thelasthalfofthenineteenthcentury_____thesteadyimprovementinthemeansoftravel.
最新回复
(
0
)