首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
运行下面的程序,输出结果是( )。 main() { int a=3,b=0,c=0; if(a==b+c) printf("****"); else printf("####");
运行下面的程序,输出结果是( )。 main() { int a=3,b=0,c=0; if(a==b+c) printf("****"); else printf("####");
admin
2013-08-15
73
问题
运行下面的程序,输出结果是( )。
main()
{ int a=3,b=0,c=0;
if(a==b+c)
printf("****");
else
printf("####");
}
选项
A、有语法错误,不能通过编译
B、输出####
C、可以通过编译,但是不能通过连接,因而不能运行
D、输出****
答案
B
解析
本题考查if语句的一般形式。当int a=3,b=0,c=0时,a=b+c=0表示逻辑假,故if(a==b+c)条件为假,输出####。
转载请注明原文地址:https://www.kaotiyun.com/show/GMJp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
以下程序统计从终端输入的字符中大写字母的个数,num[0]中统计字母A的个数,num[1]中统计字母B的个数,其他依次类推。用#号结束输入,请填空。#include<stdio.h>#include<ctype.h>mai
以下程序的输出结果是【 】。#include<stdio.h>main(){inti;for(i=’a’;i<’f’;i++,i++)printf("%c",i-’a’
以下程序的输出结果是【 】。#include<stdio.h>main(){intn=12345,d;while(n!=O){d=n%10;printf("%
有以下程序 #include <stdio.h> main() { FILE *fp; int’ a[10]={1,2,3,0,0},i; fp = fopen("d2.dat", "wb"); fwrite(a, s
设有以下定义 union data { int d1; float d2; }demo; 则下面叙述中错误的是
以下关于long、int和short类型数据占用内存大小的叙述中正确的是
下列程序的输出结果是【】。#include<stdio.h>voidfun(intx){if(x/2>0)fun(x/2);printf("%d",x);}main()
下列程序舶输出结果是【 】。#include<stdio.h>main(){inta[5]={2,4,6,8,10},*p;p=a;p++;printf("%d",*p);}
有下列程序: #include <stdio.h> void fun(int * s,int n1,int n2) { int i,j,t; i=n1;j=n2; while(i<j){t=s[
在数据库设计中,将E-R图转换成关系数据模型的过程属于( )。
随机试题
舌下腺小管开口于舌下腺大管开口于
Ifyouweretobeginanewjobtomorrow,youwouldbringwithyousomebasicstrengthsandweaknesses.Successor【61】inyourwor
慢性肾小球肾炎进入慢性肾衰竭的患者合并高血压时,其饮食宜用
未满多大年龄者,不得参与放射工作
下列哪种物质属于被动免疫制剂
根据《建设工程安全生产条例》,施工单位在使用承租的机械设备和施工机具及配件的,由______共同进行验收。
中国金融期货交易所的全面结算会员()。
A上市公司于2010年5月向中国证监会提出增发股票的申请,根据《发行管理办法》规定,下列各项中,不符合上市公司增发股票条件的是()。
Foryears,astronomersstruggledtocalculatetheageoftheuniverse.
HMSBelfastisacruiser.ShewaslaunchedinMarch1938andservedthroughouttheSecondWorldWar,playingaleadingpartint
最新回复
(
0
)