首页 > 自考
题目内容 (请给出正确答案)
[主观题]

下列程序的输出结果是。void main(){int a=1,b=2;a=a+b;b=a-b;a=a-b;printf("%d,%d\n",a,b);}

下列程序的输出结果是。void main(){int a=1,b=2; a=a+b;b=a-b;a=a-b; printf("%d,%d\n",a,b);}

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“下列程序的输出结果是。void main(){int a=1…”相关的问题
第1题
下列程序输出的结果是()。public class Lx1 {public static void main(String[] args) {char [

A.3

B.5

C.6

D.4

点击查看答案
第2题
下列程序的输出结果是______。 include<iostream> using namespace std; void fun(int &rf) {

下列程序的输出结果是______。

include<iostream>

using namespace std;

void fun(int &rf)

{

rf*=2;

}

int main()

{

int num=500;

fun(num);

cout<<num<<endl;

return 0;

}

点击查看答案
第3题
对于下列Test.java下列哪个叙述是正确的?()public class Text { public static void main (String args[]) { int m=10,n=20; if(n>m) System.out.print(“hello”); else System.out.print(“ok”); System.out.print(“你好”); }}

A.程序输出的结果是hello你好

B.程序输出的结果是hello

C.程序输出的结果是ok

D.程序输出的结果是你好

点击查看答案
第4题
下列程序的输出结果是______。 public class Example{ String str=new String("good"); char c

下列程序的输出结果是______。

public class Example{

String str=new String("good");

char ch[]={'a','b','c');

public static void main(String args[]){

Example ex=new Example();

ex.change(ex.str,ex.ch);

System.out.printin(ex.str"and"ex.ch);

}

public void change(String str,char ch []){

str="test ok"; ch[0]='g';

}

)

A.good and abc B.good and gbc

C.test ok and abc D.test ok and gbc

点击查看答案
第5题
下述程序的输出结果是【 】。 include <stdio.h> void main() { char c1[20]="

下述程序的输出结果是【 】。 include <stdio.h> void main() { char c1[20]="1234"; char c2[20]="5678"; char *p1,*p2; p1=c1; p2=c2; while(*p1++) while(*p1++=*p2++); printf("%s,c1); }

点击查看答案
第6题
下面程序的输出结果是__。void main(){int a()={1,8,2,8,3,8,4,8,5,8};printf("%d,%d\n",a【4】+3,a【4+3】); }

A.6,6

B.8,8

C.6,8

D.8,6

E.我不会

点击查看答案
第7题
若有如下程序: 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(); } 则程序运行后的输出结果是【 】。

点击查看答案
第8题
‏有以下程序‏#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

点击查看答案
第9题
若有如下程序: 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();} 则程序运行后的输出结果是【 】.

点击查看答案
第10题
有以下程序: #include<stdio.h> #define N 8 void fun(int*x,int i) {*x=*(x+i);) main(

有以下程序: #include<stdio.h> #define N 8 void fun(int*x,int i) {*x=*(x+i);) main() { int a[N]={1,2,3,4,5,6,7,8},i; fun(a,2); for(i=0;i<N/2;i++) {printf("Ha",a[i]);} printf("\n"); } 程序运行后的输出结果是()。

A.1313

B.2234

C.3234

D.1234

点击查看答案
第11题
以下程序的输出结果是void reverse(int a[],int n){int i,t; for(i=0;i<n/2;i++) {t=a[i];a[i]=a

以下程序的输出结果是 void reverse(int a[],int n) { int i,t; for(i=0;i<n/2;i++) { t=a[i]; a[i]=a[n-1-i];a[n-1-i]=t;} } main() { int b[10]={1,2,3,4,5,6,7,8,9,10};int i,s=0; reverse(b,8); for(i=6;i<10;i++)s+=b[i]; printf("%d\n",s); }

A.22

B.10

C.34

D.30

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