首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有以下稗宇: #include main() { int a=1,b=2,c=3,x; x=(a^b.&c: printf(“%d\n”,x); } 程序的运行结果是( )。
有以下稗宇: #include main() { int a=1,b=2,c=3,x; x=(a^b.&c: printf(“%d\n”,x); } 程序的运行结果是( )。
admin
2020-05-19
14
问题
有以下稗宇:
#include
main()
{ int a=1,b=2,c=3,x;
x=(a^b.&c:
printf(“%d\n”,x);
}
程序的运行结果是( )。
选项
A、3
B、1
C、2
D、0
答案
A
解析
本题考查位运算符以及相关运算。^为按位或,&为按位与,那么a^b为3,再与c按位与仍然为3,所以答案为A选项。
转载请注明原文地址:https://kaotiyun.com/show/9cCp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
给定程序中,函数fun的作用是:不断从终端读入整数,由变量a统计大于0的个数,用变量c来统计小于0的个数,当输入0时结束输入,并通过形参pa和pb把统计的数据传回主函数进行输出。请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果
给定程序MODIl.C中,函数fun的功能是判断整数n是否是“完数”。当一个数的因子之和恰好等于这个数本身时,就称这个数为“完数”。例如:6的因子包括1、2、3,而6=1+2+3,所以6是完数。如果是完数,函数返回值为1,否则函数返回值为0。数组a中存放的
以下程序:#include#includemain(){charstr[]="abcd\n\123\xab";printf("%d",strlen(str));}运行后的输出结果是
在三级模式之间引入两层映像,其主要功能之一是()。
学生的记录由学号和成绩组成,N名学生的数据已在主函数中放入结构体数组s中,请编写函数fun,它的功能是:把高于等于平均分的学生数据放在b所指的数组中,高于等于平均分的学生人数通过形参n传回,平均分通过函数值返回。注意:部分源程序在文件PROG1.
若有定义语句doublea,*p=&a;,下列叙述中错误的是()。
有以下程序:#include<stdio.h>main(){struetSTU{charname[9];charsex:doublescore[2];};structSTUa={"Zhao",’m’,85.0,90.0},b
下面不属于软件测试实施步骤的是
在软件开发中,需求分析阶段产生的主要文档是
以下不能将s所指字符串正确复制到t所指存储空间的是()。
随机试题
适宜性教学认为,幼儿教学包括两方面的适宜:年龄适宜和性别适宜。
普通话的轻声是四声之外的独立声调。()
以下所列药品商品名中,对乙酰氨基酚复方制剂的商品名是
行政复议期间具体行政行为不停止执行,但是有()情形的,可以停止执行。
计算企业所得税的计税收入为()万元。该企业应纳税所得额为()万元。
(2013年卷二第64题)根据商标法及相关规定,下列关于注册商标有效期的哪些说法是正确的?
妇女社会工作主要是以妇女为服务对象的社会工作,其工作内容涉及面很广。针对全体女性人口的妇女社会工作有()。
严肃与谨慎相结合政策的总精神是()。
Theywereexpectedtobemodelsofvirtue,honouredas______fortheircharacterasfortheirlearning.
Somepeopleliketo________asmallsumofmoneyincaseofurgentneed.
最新回复
(
0
)