题目内容 (请给出正确答案)
[主观题]

程序运行后的输出结果是()A.3 B3 B3 B.2 C2 C2 C.1 D1 D1 D.0

67)有以下程序:

#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>

void main()void main()void main()void main()void main()void main()void main()void main()void main()void main()void main()

{int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;

if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;

else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)

if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;

else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;

printf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%d\n",y);n",y);n",y);n",y);n",y);n",y);

}

程序运行后的输出结果是()。

A)3 B3 B3 B)2 C2 C2 C)1 D1 D1 D)0

暂无答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“程序运行后的输出结果是()A.3 B3 B3 B.2 C2 …”相关的问题

第1题

以下叙述中正确的是( )A此 while 语句将无限循环

66)有以下程序:

#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>

main()main()main()main()main()main()

{while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='\n');n');n');n');

}

以下叙述中正确的是

A)此 while 语句将无限循环

B)getchar() 不可以出现在 while while while while while while 语句的条件表达式中

C)当执行此 while 语句时 ,只有按回车键程序才能继续执行

D)当执行此 while 语

点击查看答案

第2题

以下程序的运行结果_______。#include void main( )

以下程序的运行结果_______。

#include <stdio.h>

void main( )

{

   int a[3][4]={2,4,6,8,10,12,14,16,18,20,22,24};

   int (*p)[4]=a,i,j,k=0;

   for(i=0;i<3;i++)

      for(j=0;j<2;j++)

         k+=*(*(p+i)+j);

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

}

    A、65

    B、66

    C、67

    D、68

点击查看答案

第3题

若变量已正确定义并赋值,以下不能构成C语句的选项是( ).A.A=a+b;B.B++;

若变量已正确定义并赋值,以下不能构成C语句的选项是( ).

A.A=a+b;

B.B++;

C. A?a:b;

D.a=a+b

点击查看答案

第4题

请教:2012年9月计算机二级考试C语言真题试卷第2大题第14小题如何解答?

【题目描述】

【我提交的答案】:1

【参考答案分析】:

6

【我的疑问】

为什么我的答案不对?求教

点击查看答案

第5题

请教:2012年9月计算机二级考试C语言真题试卷第2大题第13小题如何解答?

【题目描述】

【我提交的答案】:1

【参考答案分析】:

2

【我的疑问】

为什么我的答案不对?求教

点击查看答案
热门考试 全部 >
相关试卷 全部 >
账号:
你好,尊敬的上学吧用户
发送账号至手机
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信