下列加点词解释有误的一项是()
A.世祖引允与论刑政,言甚称旨称:适合
B.遂除田禁,悉以授民除:解除
C.主上向我,为首为讳乎首:自首
D.如君言,诱我死,何其不直直:值得
第1题
已知如下程序的输出结果是23,请将画线处缺失的部分补充完整。
include <iostream>
using namespace std;
class MyClass {
public:
void Print() const { cout << 23; }
};
int main() {
MyClass* p = new MyClass();
【 】.Print();
return 0;
}
第2题
以下程序运行后的输出结果是 。 (条件表达式的多样性) #include <iostream> using namespace std; void main() { int a = 3, b = 4, c = 5, t = 99; if(b) if(a) cout< </iostream></endl;> << <t> < <endl; else>
第3题
(32 )有如下程序;
#include<iostream>
using namespace std;
class Base{
public:
void output(){cout<<1;}
virtual void Print(){cout<<'B';}
};
class Derived:public Base{
public:
void output(){cout<<2;}
void Print(){cout<<'D';}
};
int main(){
Base *ptr=new Derived;
ptr->output();
ptr->Print();
delete ptr;
return 0;
}
程序的输出结果是
A ) 1B
B ) 1D
C ) 2B
D ) 2D
第4题
有如下程序: #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***
第5题
在下面的程序的横线处填上适当的语句,使该程序的输出结果为12。
include<iostream>
using namespace std;
class TestClass
{
public:
int a,b;
TestClass(int i,int j)
{
a=i;
b=j;
}
};
class TestCla
第6题
下面程序的运行结果是()。 #include <iostream> #include <cstring> using namespace std; int main() { char s1[10]="abc"; char s2[20]="inter"; int k=0,j=0; while (s2[k]) k++; while(s1[j]) s2[k--]=s1[j++]; cout<<s2<<endl; return 0;> A、abc
B、inter
C、intcba
D、interabc
第8题
有如下程序: #include <iostream> using namespace std; Class x { protected: int a; public: x() { a=1; } }; class x1 : virtual public x { public: x1() { a+=1; cout<<
A.1
B.123
C.242
D.244
第9题
有如下程序: #include <iostream> 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***
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!