未分类题
若语句: cout<<setfill('>')<<setw(5)<<3141512<<setw(5)<<'OK!'; 是程序中第1个输出语句,则输出结果是
D.31415>>OK!
A.3141512>>OK!
B.31415120K!>>
C.314150K!>>
【参考答案】
A
解析:本题考核能够使用格式控制数据的输入输出.函数setw(int n)用来设置输入输出宽度,当实际数据宽度......
(↓↓↓ 点击下方‘点击查看答案’看完整答案 ↓↓↓)
点击查看答案
<上一题
目录
下一题>
热门
试题
未分类题
有以下程序:#include <iostream>using namespace std;class A{public: A(int i,int j) { a=1; b=j; } void move (int x,int y) { a+=x; b+=y; } void show() cout<<a<<','<<b<<end1 } private: int a,b; }; class B : private A { public: B(int i,int 3):A (i,j) {} void fun() { move (3,5); } void f1() { A::show(); } }; int main() { B d(3,4); D.fun(); D.f1(); return 0; } 程序执行后的输出结果是A.3,4B.6,8C.6,9D.4,3
A.fun();
B.f1();
C.3,4
B.6,8
C.6,9
点击查看答案
未分类题
假定有如下的Sub过程: Sub sfun(x As Single,y As Single) t=x x=t y y=t Mod y End Sub 在窗体上添加一个命令按钮(名为Command1),然后编写如下事件过程: Private Sub Command1_Click() Dim a As single Dim b As single a=5 b=4 sfun a,b MsgBox a & chr(10)+chr(13)&b End Sub 打开窗体运行后,单击命令按钮,消息框的两行输出内容分别为( )。D.5和4
A.1和1
B.1.25和1
C.1.25和4
点击查看答案
相关试题
患者男,75岁,因感冒后左前额眼周出现群...
若有两个字符串s1='12345',s2='...
During the 1990s boom Dell Comp...
By mentioning 'the figures are as ...
When mentioning 'the something-for-...