重要提示:请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
首页 > 高职专科
网友您好,请在下方输入框内输入要搜索的题目:
搜题
拍照、语音搜题,请扫码下载APP
扫一扫 下载APP
题目内容 (请给出正确答案)
[主观题]

若有如下程序: void sub() {static int x=6; x/=2;printf("%d",x); } main()

若有如下程序: void sub() {static int x=6; x/=2;printf("%d",x); } main() {int m; for(m=0;m<=2;m++) sub(); } 则程序运行后的输出结果是【 】。

答案
查看答案
更多“若有如下程序: void sub() {static int x=6; x/=2;printf("%d",x); } main()”相关的问题

第1题

若有如下程序: void sub() { static int x=8; x/=2;printf("%d",x); }

若有如下程序: void sub() { static int x=8; x/=2;printf("%d",x); } main() { int m; for(m=0;m<2;m++) sub();} 则程序运行后的输出结果是【 】.

点击查看答案

第2题

若有如下程序: sub(int*y) {while(--(*y)); printf("%d",(*y)--);} main()

若有如下程序: sub(int*y) {while(--(*y)); printf("%d",(*y)--);} main() { int x=10; sub(&x); } 则程序运行后的输出结果是【 】。

点击查看答案

第3题

若有如下程序: main() { int x=4,y=1; printf("%d\n",sub(x,sub(x,y))); }

若有如下程序: main() { int x=4,y=1; printf("%d\n",sub(x,sub(x,y))); } sub(int i,int j) { static int a=0; int b=2; a+=i+b; b+=j+a; } 则程序运行后的输出结果是【 】。

点击查看答案

第4题

若有如下程序: int s[3] [3]={'a','b','C','d','e','f','g','h','i'},*t; main() {t:(int*)malloc(sizeof(int)); sub(t,s); printf("%c\n",*t); } sub(int*p,int b[][3]) {*p=b[2][1]; } 则程序运行后的输出结果是()。

A.d

B.e

C.h

D.b

点击查看答案

第5题

若有如下程序: #include"stdio.h" void main() {FILE *fp; fp=fopen("test","wb"); fprintf(fp,"%d%.1f,%c%c",5,238.41,'B','h'); fclose(fp); } 则程序运行后向文件输出的结果是()。

A.5238.41Bh

B.5238.4,Bh

C.5,238.4,B,h

D.5238.41Bh

点击查看答案

第6题

若有如下类定义:class Shape {public:virtual void Draw()=0;};则下列关于Shape类的叙述中,正确的是()。

A. 类Shape是虚基类

B.类Shape是抽象类

C.类Shape中的Draw函数声明有误

D.“Shape s;”能建立Shape的对象s

点击查看答案

第7题

阅读如下程序; Private Sub Form. Click() msg1$=“继续吗?” msg2$=“操作对话

阅读如下程序; Private Sub Form. Click() msg1$=“继续吗?” msg2$=“操作对话框” r=MsgBox(msg1$,vbYesNo OrvbDefaultButton2,msg2$) End Sub 程序运行后,单击窗体,将产生一个信息框。此时如果直接按回车键,则相当于用鼠标单击信息框中的【 】按钮。

点击查看答案

第8题

若有以下程序:  #include <iostream>  using namespace std;  class Base  {  private:   int a,b;  public:   Base(int x, int y)   {     a=x;     b=y;   }   void disp ()   {     cout<<a<<" "<<b<<end1;   }  };  class Derived : public Base  {  private:   int c;   int d;  public:   Derived(int x,int y, int z,int m) :Base(x,y)   {     c=z;     d=m;   }   void disp ()   {     cout<<c<<" "<<d<<end1;   }  };  int main()  {   Base b(5,5),*pb;   Derived obj(1,2,3,4);   pb=&obj;   pb->disp();   return 0;  }  执行程序后的输出结果是()。

A.1,2

B.3,4

C.2,3

D.5,5

点击查看答案

第9题

如果(AL)=03H,(BL)=05H,执行如下程序片段后,(1)SUB AL,BL(2)AAS,得到CF等于()。

A.0FEH

B.0

C.1

D.09H

点击查看答案

第10题

有如下程序:#include<iostream>using namespace std;class B{public:Virtual void show(){cout<<

有如下程序: #include<iostream> using namespace std; class B{ public: Virtual void show(){cout<<“B”;} }; class D:publicB{ public: void show(){cout<<“D”;} }; void funl(B*ptr){ptr->show();} void{un2(B&ref){ref.show();} void

A.BBB

B.BBD

C.DBB

D.DBD

点击查看答案
下载APP
关注公众号
TOP
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案 购买前请仔细阅读《购买须知》
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《服务协议》《购买须知》
立即支付 系统将自动为您注册账号
已付款,但不能查看答案,请点这里登录即可>>>
请使用微信扫码支付(元)

订单号:

遇到问题请联系在线客服

请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示:请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
请用微信扫码测试
优题宝