首页 > 大学专科> 电子信息
题目内容 (请给出正确答案)
[主观题]

写出程序的输出结果。 #include main() {ìntk=lO; char c="b"'; do swith

写出程序的输出结果。

#include

main()

{ìntk=lO; char c="b"';

do

swith(c++)

{ case'a':k++;

case'b':k--;

case'c' :k+=3;break;

case'd',:k=k%4;

}

while(c! ='c');

printf("%d\n",k );

}

运行结果是:____________

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“写出程序的输出结果。 #include main() {ìn…”相关的问题
第1题
写出程序的运行结果。 #include main() {int a, b; scanf ("%d%d", &a,

写出程序的运行结果。

#include

main()

{int a, b;

scanf ("%d%d", &a, &b);

if (a>=h) printf("Yes");

printf (" a+h =%d\n", a+h );

}

如果输入:a=6,b=8,则输出结果是___________

点击查看答案
第2题
请写出如下程序的输出结果:#include void Swap( int &a, int & b);void main(){int
请写出如下程序的输出结果:#include void Swap(int &a, int & b);void main(){int

请写出如下程序的输出结果:

#include void Swap(int &a, int & b);void main(){int x(10 ), y(7 );

cout<< "x="<< x<< " y="<< y<< endl;Swap(x , y );cout<< "x="<< x<< " y="<< y<< endl;

}void Swap(int & a, int & b){ int temp; temp = a ; a=b ; b=temp ; }

点击查看答案
第3题
阅读下面程序,写出输出结果。#include using namespace std ; class A { int a, b; public :
阅读下面程序,写出输出结果。#include using namespace std ; class A { int a, b; public :

阅读下面程序,写出输出结果。

#include using namespace std ; class A { int a, b; public : A() { a = b = 0; }

A(int aa, int bb) { a = aa; b = bb; cout << a << ' ' << b << endl ; } }; int main() { A x, y(2,3);

return 0; }

点击查看答案
第4题
写出下列程序输出结果()。#include<stdio.h >main(){int a=3, b=5,s; ;s=a*b;printf (s=%d/n, s);}
写出下列程序输出结果()。#include<stdio.h >main(){int a=3, b=5,s; ;s=a*b;printf (s=%d/n, s);}

点击查看答案
第5题
请写出如下程序的输出结果:#include class R{public:R(int r1,int r2) {R1=r1;R2=r2;}void p
请写出如下程序的输出结果:#include class R{public:R(int r1,int r2) {R1=r1;R2=r2;}void p

请写出如下程序的输出结果:

#include class R{public:R(int r1,int r2) {R1=r1;R2=r2;}void print();

void print() const;private:int R1,R2;};void R::print(){cout<< R1<< ":"<< R2<< endl;

}void R::print() const{cout<< R1<< ";"<< R2<< endl;}void main(){R a(5,4);a.print();

const R b(20,52);b.print();}

点击查看答案
第6题
写出以下程序的运行结果。#include int fun(int a){int b=0;static int c=3;b ; c ;return(a
写出以下程序的运行结果。#include int fun(int a){int b=0;static int c=3;b ; c ;return(a

写出以下程序的运行结果。

#include int fun(int a){int b=0;static int c=3;b ; c ;return(a b c);}

main(){int i, a=5;for (i=0; i<3; i )cout<< i<< " "<< fun(a)<< " ";}

点击查看答案
第7题
描述程序功能并写出程序执行结果:#includemian(){inta=[3][3]={1,3,5,7,9,11,13,15,17},sum=0,i,for(i=0;i<3;j++)if(i==j)sum=sum+a[j];printf(“sum=%d\n”,sum);}

点击查看答案
第8题
如下程序的输出结果是什么#include<stdio.h>int main(void){int aaa=0;aaa=011;printf("%d",aaa);return 0;}()

A.011

B.11

C.9

D.%d

点击查看答案
第9题
以下程序的输出结果为()。 include<stdio.h> define PT 5.5 define S(x)PT*x*x

以下程序的输出结果为()。 include<stdio.h> define PT 5.5 define S(x)PT*x*x void main() { int a=1,b=2; printf("%5.1f\n",S(a+b)); )

A.12.0

B.9.5

C.12.5

D.33.5

点击查看答案
第10题
现有如下程序,则程序的输出结果为()。 include“stdio.h” int f(int a,int b) { int c; i

现有如下程序,则程序的输出结果为()。 include“stdio.h” int f(int a,int b) { int c; if(a>0&&a<10)c=(a+b)/2; else c=a*b/2; return c; } void main() { int a=8,b=20,c; c=f(a,b); printf(“%d\n”,c), }

A.随机数

B.80

C.28

D.14

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改