题目内容 (请给出正确答案)
[主观题]

下面程序执行后的输出结果是: #include <iostream> using namespace std; #define N 20 vo

下面程序执行后的输出结果是: #include <iostream> using namespace std; #define N 20 void fun(int a[],int n,int m) { int i; for(i=m;i>=n;i--) a[i+1]=a[i]; } int main() { int i; int a[N]={1,2,3,4,5,6,7,8,9,10}; fun(a,2,9); for(i=0;i<5;i++) return 0;>

提问人:网友chiropter 发布时间:2022-01-07
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
更多“下面程序执行后的输出结果是: #include <iostr…”相关的问题
第1题
下列程序的输出结果是: include <iostream> using namespace std; class Base { public: void print ( ) { cout << 'B'; } }; class Derived : public Base { public: void print ( ) { cout << 'D'; } }; int main( ) { Derived * pd = new Derived( ); Base * pb = pd; pb->print( ); pd->print( ); delete pd; return 0; }

A、BD

B、BB

C、DD

D、DB

点击查看答案
第2题
给出下列程序的运行结果( )。 #include<iostream> using namespace std; int main() { int *p; p=new int(99); *p=100; cout<<*p; delete p; return 0;> A、99

B、100

C、0

D、以上都不正确

点击查看答案
第3题
写出下面程序执行后的运行结果。 #include <iostream> #include <string> using namespace std; void f____ { char *t; int i,j; for____ for ____ if ____ > 0) { t = p[i]; p[i] = p[j]; p[j] = t; } } void main____ { char *p[5] = { "abc", "aabdfg", "abbd", "dcdbe", "cd" }; f____; cout << strlen____; }
点击查看答案
第4题
以下程序的输出结果是 。 #include<iostream> using namespace std; void main() { int num = 2; while(num-- ) ; cout<<num<<endl;>
点击查看答案
第5题

以下程序的输出结果是 。 #include <iostream> using namespace std; void main() { int x=5,y=9,a=0; while (x++!=y--) a+=1; cout<<"x="<> <<",y="<> <<",a="< y> </",a="<></",y="<></"x="<></iostream></"\nmax="<<></iostream></endl;></num></iostream></",></2+1;></iostream></num></"result="<></iostream></endl;></iostream></(x=x<<1)<></iostream></100或x<0的c++表达式是></x><<"\n";>

点击查看答案
第6题
下面程序输出是: using namespace std; #include <iostream> int t(){ static int i; i+=5; return i; } int main(void){ cout << t() << '\t'; cout << t() << '\n'; return 0 ; }

A、0 5

B、5 5

C、5 10

D、随机数

点击查看答案
第7题

以下程序输出是() #include <iostream> using namespace std; #include <cstring> void fun(char *w, int m) { char s, *p1, *p2; p1=w; p2=w+m-1; while( p1 <p2 ) { s="*p1++;" *p1="--(*p2);" p2--; *p2="s;" } void main( char a[ ]="CDEFGHI" ; fun( a, strlen(a));> A、IHGFEDC

B、CHBBHCI

C、CHBBGBH

D、CHHFCHI

点击查看答案
第8题
以下程序的运行结果是()。 #include <iostream> using namespace std; void main( ) { struct cmplx { int x; int y; } cnum[2]={1, 3, 2, 7}; cout<<(cnum[0].y cnum[0].x*> A、0

B、1

C、3

D、6

点击查看答案
第9题
有如下程序: #include <iostream> using namespace std; class Base{ protected: Base(){cout<<'a';} base(char }; derived:public base{ public: derived(char int main(){ derived d1('b'); return 0; }> A、B

B、BA

C、AB

D、BB

点击查看答案
第10题
有如下程序: #include using namespace std; class Base { public: void funl{cout$amp;A.Base Base

B.Base Derived

C.Derived Base

D.Derived Derived

点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
简答题
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
简答题
点击打开微信