首页 > 计算机应用技术> 计算机操作系统
题目内容 (请给出正确答案)
[主观题]

下面程序的输出结果为______。 int a=-1; if(a) printf("it is true\n"); else printf(&qu

下面程序的输出结果为______。

int a=-1;

if(a) printf("it is true\n");

else printf("it is false"\n");

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“下面程序的输出结果为______。 int a=-1; if…”相关的问题
第1题
执行下面程序,输出的结果为()

A.4,3,2

B.3,3,2

C.3,3,3

D.3,2,2

点击查看答案
第2题
下面程序运行后的输出结果为()。PrivateSubCommand1_Click()Dims,iAsIntegeri=2DoUntili>8i=i+3s=4*i+5LoopPrintsEndSub

A.37

B.49

C.25

D.13

点击查看答案
第3题
下面程序段的输出结果为_______。public class Test { public static void main(String args
[]){ char c1,c2,c3; c1='H'; c2='\\'; c3='\115'; System.out.print(c1); System.out.print(c2); System.out.print(c3);

A.H\M

B.H\\\115

C.H115

D.无输出

点击查看答案
第4题
执行下面代码,结果为():name_list=[]ifname_listandname_list[100]=='张三':print('OK')

A.程序报错

B.OK

C.NULL

D.无输出

点击查看答案
第5题
下面程序段的输出结果为_______。public class NewClass { public static void main(String a
rgs[]){ int x,y; x=(int)82.5; y=(int)'A'; System.out.print("x="+x); System.out.print("\ty="+y); } }

A.82 A

B.82 65

C.82.5 A

D.82.5 65

点击查看答案
第6题
下面程序的输出结果为()。 main() { int a=1,b=0; switch(a) { case 1: switch (b) { case 0: printf("**0**"); break; case 1: printf("**1**"); break; } case 2: printf("**2**"); break; }}

A.有语法错误

B.**0****2**

C.**0****1****2**

D.**0**

点击查看答案
第7题
下面程序段的输出结果为_______。class OverMethod{ void printMeth(){ System.out.println(&
quot;There is none parameter."); } void printMeth(String t){ System.out.println("There is one parameter."); } void printMe

A.There is one parameter.There is none parameter.There are two parameters.

B.There is none parameter.There is one parameter.There are two parameters.

C.There is none parameter.It’s good!There are tw

D.It’s good!There is none parameter.There are two parameters.

点击查看答案
第8题
下面程序段的输出结果为()。public class MethLoad {public static void main(String args[]
{MethLoad classObj=new MethLoad();classObj.methTest(4);classObj.methTest(4.0);}void methTest(double d){double sum=2*d};}

A.The result is:16 The result is:8.0

B.The result is:8.0 The result is:16

C.The result is:8 The result is:16.0

D.The result is:16.0 The result is:8

点击查看答案
第9题
下面程序的输出结果为:87,则横线处应填入()。 #include using namespace std;struct Student
{char num[8];char name[10]}int score[3];} stu[]={{“1210101”,“Zhangsan”,{87,97,67}},{“1210102”,“Lisi”,{92,86,79}}}; int main() {cout##; return 0;}

A.stu[1].score[1]

B.stu[0].score[0]

C.stu[1].score[0]

D.stu[0].score[1]

点击查看答案
第10题
执行下面代码结果()for(inti=0;;){System.out.println("这是"+i);break;}

A.语法错误,缺少表达式2和表达式3

B.死循环

C.程序什么都不输出

D.输出:这是0

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