首页 > 职业资格考试> 保险
题目内容 (请给出正确答案)
[单选题]

有以下程序void f(int v,int w){int t;t=v;v=w;w=t;}main(){ int x=1,y=3, z=2;if(x>y)f(x, y);else if(y>z) f(y,z);elsef(x,z);printf("%d,%d,%d/n",x,y, z);}执行后输出结果是()。

A.1,2,3

B.3,1,2

C.1,3,2

D.2,3,1

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“有以下程序void f(int v,int w){int t…”相关的问题
第1题
以下程序的输出结果是()。#include<ctype.h>void space(char *str){int i,t;char ts[81];for (i=0,t=0;str[i]!='/0';i+=2)if (!isspace(*str+i)&&(*(str+i)!='a'))ts[t++]=toupper(str[i]);ts[t]='/0';strcpy(str,ts);}void mian(){char s[81]={"a b c d e f g"};space(s);puts(s);}

A.ABCDEFG

B.CDG

C.abcdefgh

D.abCDefGh

点击查看答案
第2题
‏有以下程序‏#include‏void main()‏{int a,b,c=290;‏ a=(c/100)%9;‏ b=(-1)&&(-1);printf("%d,%d/n",a,b);}‏输出结果是()。

A.2,-1

B.3,1

C.2,0

D.2,1

点击查看答案
第3题
‍下面程序段运行的结果为()。‎#include‎int f();‎int f()‎{static int i=0;‎int s=1;s+=i;‎i++;‎ return s;}‎void main()‎{int i,a=0;‎for(i=0;i<5;i++)‎ a+=f();‎ printf("%d/n",a);}

A.25

B.15

C.20

D.24

点击查看答案
第4题
写出以下程序的运行结果

class A{

int x=100;

}

class B extends A{

int x=200;

void prt(){

System.out.println("SubClass: "+x);

System.out.println("SuperClass: "+super.x);

}

public static void main(String args[]){

new B().prt();

}

}

点击查看答案
第5题
写出以下程序的运行结果。public class Test2 {public static void main(String args[ ]){int i,j

写出以下程序的运行结果。public class Test2 {public static void main(String args[ ]){int i,j;int a[]={17,91,65,35,28};for (i = 0; i < a.length-1; i++ ) {int k = i;for(j = i; j < a.length; j++ )if (a[j]>a[k] )k = j;int temp =a[i];a[i] = a[k];a[k] = temp;}for (i =0; i<a.length; i++ )System.out.print(a[i]+" ");System.out.println();} }

点击查看答案
第6题
写出以下程序的运行结果。

public class Class1

{

public static void main(String args[])

{

int n=6,sum=0;

for(int k=1;k<=n;k++)

{

if (n%k==0)

sum+=k;

}

System.out.println(sum);

}

}

点击查看答案
第7题
‎阅读以下程序:‎#include‎void main()‎{int x;scanf("%d",&x);if(x--<5)printf("%d", x);else‎printf("%d", x++);}‎程序运行后,如果从键盘上输入5,则输出结果是()。

A.4

B.5

C.3

D.6

点击查看答案
第8题
写出下列程序的运行结果。#include void Fun(){int num=20;cout<< "The Fun's num i
写出下列程序的运行结果。#include void Fun(){int num=20;cout<< "The Fun's num i

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

#include void Fun(){int num=20;cout<< "The Fun's num is"<< num<< endl;

}void main(){int num=10;cout<< "The main's num is "<< num<< endl;Fun();{int num=30;

cout<< "The Field's num is "<< num<< endl;}cout<< "The main's num is "<< num<< endl;}

点击查看答案
第9题
阅读如下代码:public class X5_3_3 extends Hide {int x = 200;public static void main(Stri

A.100

B.200

C.程序错误

D.300

点击查看答案
第10题
执行下面程序的输出结果为()。#includevoid main() {int x=36,y=48,z;do {z=x%y; x

程序填空题:执行下面程序的输出结果为()。

#include

void main() {

int x=36,y=48,z;

do {z=x%y; x=y; y=z;} while(y>0); .

printf("x=%d/n",x);

}

点击查看答案
第11题
以下程序的功能是求两个非0整数相除的商和余数。程序有几处错误,试找出它们加以修改,并上机验证修改结果。 #include iostream using namespace std; int main() {int x,y,r1,r2; cin>>x>>y; if(x=0||y=0..

以下程序的功能是求两个非0整数相除的商和余数。程序有几处错误,试找出它们加以修改,并上机验证修改结果。 #include "iostream" using namespace std; int main() {int x,y,r1,r2; cin>>x>>y; if(x=0||y=0) cout<<”input else { if(x> y) r1=x/y; r2=x%y; else r1=y/x; r2=y%x; } cout<<”商=> <<” 余数="”&lt;"> < <endl; system("pause"); return 0;>

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