首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序的运行结果是( )。 #include<stdio.h> main() {int a=3,b=4,C=8,d=4,m=1,n=3; printf("%d\n",(m=a>b)&&(n=c>d));}
以下程序的运行结果是( )。 #include<stdio.h> main() {int a=3,b=4,C=8,d=4,m=1,n=3; printf("%d\n",(m=a>b)&&(n=c>d));}
admin
2021-04-28
13
问题
以下程序的运行结果是( )。
#include<stdio.h>
main()
{int a=3,b=4,C=8,d=4,m=1,n=3;
printf("%d\n",(m=a>b)&&(n=c>d));}
选项
A、0
B、1
C、2
D、3
答案
A
解析
逻辑与(&&)运算符的功能是:当“&&”运算符两边的运算对象均为1时,整个表达式的值为1,否则为0。因为a=3<b=4,即m=0,所以整个表达式的值为0。
转载请注明原文地址:https://kaotiyun.com/show/4Ptp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
以下叙述中正确的是
有以下程序#includecharfun(char*c){if(*c=’A’)*c-=’A’-’a’;return*c;}main(){chars[81],*p=s;gets(s);while(
若有以下程序段charstr[4][12]={’’aa’’,’’bbb’’,’’ccccc’’,’’d’’),*strp[4];inti;for(i=0;i<4;i++)strp[i]=str[i];不能正确引用字符串的选项是
以下程序依次把从终端输入的字符存放到f文件中,用#作为结束输入的标志,则在横线处应填入的选项是#includemain(){FILE*fp;charch;fp=fopen("fname","w
有以下程序:#include<stdio.h>main(){inta=1,b=3,C=5;int*p1=&a,*p2=&b,*p=&c;*p=*p1*(*p2);printf("%d\n",c);}程序的运行结果是()。
面向对象方法中,实现对象的数据和操作结合于统一体中的是()。
将E-R图转换为关系模式时,实体和联系都可以表示为()。
在长度为n的顺序表中查找一个元素,假设需要查找的元素一定在表中,并且元素出现在表中每个位置上的可能性是相同的,则在平均情况下需要比较的次数为()。
设二叉树的前序序列为ABDEGHCFIJ,中序序列为DBGEHACIFJ。则按层次输出(从上到下,同一层从左到右)的序列为
某二叉树有5个度为2的结点,则该二叉树中的叶子结点数是
随机试题
劳动法律责任
割裂感性认识和理性认识的辩证统一关系,在实际工作中就会犯的两种错误是()
请简述硬件与软件的关系。
将DNA核苷酸顺序的信息转变成为氨基酸顺序的过程包括
A.高渗盐水试验B.水利尿试验C.螺内酯试验D.饥饿试验鉴别原发性醛固酮增多症与失钾性肾病的试验是
患者,男性,62岁,工程师,既往偶有心前区疼痛,含服硝酸甘油有效,此次因工作过累后心前区剧烈疼痛4小时余就诊,含服硝酸甘油无效。护士接待时应首先安排的检查是
下列关于气雾剂的表达正确的是()
(2013年)关于单一品种大批量型生产物流特征的说法,正确的是()。
2016年1—5月份,全国规模以上工业企业实现利润总额23816.4亿元,同比增长6.4%,增速比1—4月份回落0.1个百分点。1—5月份,在规模以上工业企业中,国有控股企业实现利润总额4290.2亿元,同比下降7.3%;集体企业实现利润总额17
Thefirstbicyclesweremadeofwood.Cyclemanufacturersthenswitchedtosteeltubes.Thesedays,forhigh-endbikeswherewei
最新回复
(
0
)