For visitors (whose) time is limited (and are unable) to learn the history and examine the building in detail (on) the spot, it is suggested that the following plan of a journey (be followed).
A.whose
B.and are unable
C.on
D.be followed
第1题
运行程序,程序输出结果为() #include <iostream> using namespace std; int main() { struct s { int x; } a[3]; cout< <sizeof(a); return 0;> A、4
B、12
C、18
D、6
第2题
以下程序的输出结果是【 】。
include <iostream>
using namespace std;
int main()
{
char S[ ]="abcdef";
s[3]='\0';
cout<<s<<end1;
return 0;
}
第3题
以下程序的输出为() #include<iostream> using namespace std; void s(int a, int& b) { int t = a; a = b; b = t; } void main() { int x = 500, y = 1000; cout << x << ’,’ << y << ’\n’; s(x, y); cout << x << ’,’ << y << ’\n’; }
第4题
下列程序的输出结果是【 】。
include<iostream>
include<cstring>
using namespace std;
void fun(const char *s,char &c){c=s[strlen(s)/2];}
int main()
{
char str[]="ABCDE";
char ch=str[1];
fun(str,ch);
cout<<ch;
return 0;
}
第5题
以下程序的输出结果是 。 #include <iostream> #include <iomanip> using namespace std; void main() { int i; for (i=1;i>=0;) cout< <i--;>
第6题
下列程序的输出结果是()。 #include<iostream> using namespace std; int main(){ int x[6]={1,3,5,7,9,11},*k,**s; k=x; s=&k; cout<< *(k++) <<"," << **s<<endl; return 0; }
A.3,3
B.1,1
C.3,5
D.1,3
第7题
以下程序的输出结果是【 】。
include <iostream>
using namespace std;
int main()
{
int s,i;
for(s=0,i=1;i<3;i++)
s+=i;
cout<<s<<end1;
return 0;
}
第8题
下列程序的输出结果是________。#include <iostream> using namespace std; int a=5; void fun (int a) { ::a -= --a; cout<<::a<<’\t’<><<’\n’; } int main() { a="5;" for(int i="-5;" fun(a); return 0;>
第9题
下列程序的输出结果为2,请将程序补充完整。
include<iostream>
using namespace std;
class Basc
{
public:
【 】void fun(){cout<<1;}
};
class Dcrived:public Base
{
public:
void fun(){cout<<2;}
};
int main()
{
Base*p=new Derived;
p->fun();
delete p;
return 0;
}
第10题
下列程序的输出结果为2,请将程序补充完整。
include<iostream>
using namespace std;
class Base
{
public:
______void fun(){cout<<1;}
};
class Derived:public Base
{
public:
void fun(){cout<<2;}
};
int main()
{
Base*p=new Derived;
p->fur();
delete p;
return 0;
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!