有如下程序: #include<iostream> using namespace std; class Sample{ public:
A.1
B.2
C.3
D.4
A.1
B.2
C.3
D.4
有如下程序: #include<iost earn> using namespace std; class TestClass{ protected: TestClass(){cout<<'x';} TestClass(char C) {cout<<c;} }; class TestClass1:public TestClass { public: TestClass1(char C) {Cout<<c;) }; int main(){ TestClass1 d1('y'); return 0; } 执行这个程序,屏幕上将显示输出()。
A.y
B.yx
C.xy
D.yy
若有以下程序: #include <iost ream> using namespace std; class A { private: int a; public: A(int i) { a=i; } void disp () { cout<<a<<", "; } }; class B { private:
A.10,10,10
B.10,12,14
C.8,10,12
D.8,12,10
B.***123456***
C.***123456
D.123456
有如下程序: #include<iostream> using namespace std; int main() { cout.fill('*') cout.width(6); cout.fill('#') cout<<123<<endl; return 0; } 执行后的输出结果是
A.###123
B.123###
C.***123
D.123***
有如下程序: #include <iostream> #include <iomanip> using namespace std; int main() { cout.fill('*'); cout.width(6); cout.fill('#'); cout<<123<<end1; return 0; } 执行生的输出结果是()。
A. ###123
B.123###
C. ***123
D.123***
有如下程序:#include <iostream>#include <iomanip>using namespace std;int main(){cout.fill('*');cout<<left<<setw(4)<<123<< "OK"<<end1;return 0;}执行这个程序的输出结果是()。
A.123*OK
B.123*OK**
C.*123OK
D.*123**OK
有如下程序:
#include<iomanip>
#include<iostream>
using namespace std;
int main(){
cout<<setfill('*')<<setw(6)<<123<<456;
return 0;
}
运行时的输出结果是()。
A) ***123***456
B) ***123456***
C) ***123456
D) 123456
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!