首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
若有以下程序 #include <stdio.h> main() { int c; c= 10^5; printf("%d\n", c); } 则程序的输出结果是
若有以下程序 #include <stdio.h> main() { int c; c= 10^5; printf("%d\n", c); } 则程序的输出结果是
admin
2020-07-28
23
问题
若有以下程序
#include <stdio.h>
main()
{ int c;
c= 10^5;
printf("%d\n", c);
}
则程序的输出结果是
选项
A、5
B、15
C、10000
D、105
答案
B
解析
本题考查位运算中按位异或运算符,异或运算只有在两个比较的位不同时其结果是1,否则结果为0,10用二进制表示为00001010,5用二进制表示为00000101,异或后00001111,即15,选项B正确。
转载请注明原文地址:https://kaotiyun.com/show/wF3p777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
下面对软件测试和软件调试有关概念叙述错误的是
以下正确的字符串常量是
有以下程序main(){inta=1,b=2,c=3,x;x=(a^b)&c;printf("%d\n",x);}程序的运行结果是
有以下程序#include<stdio.h>main(){inti,j,m=55;for(i=1;i<=3;i++)for(j=3;j<=i;j++)m=m%j;printf("%d\n",m);}程序的运行结果是
若有以下程序main(){inta=-2,b=0;do{++b;}while(a++);printf("%d,%d\n",a,b);}则程序的输出结果是
使用VC++2010打开考生文件夹下prog1中的解决方案。此解决方案的项目中包含一个源程序文件prog1.c。在此程序中,编写函数fun,该函数的功能是:统计一行字符串中单词的个数,作为函数值返回。字符串在主函数中输入,规定所有单词由小写字母组成,单词之
使用VC++2010打开考生文件夹下modi1中的解决方案。此解决方案的项目中包含一个源程序文件modi1.c。在此程序中,假定整数数列中的数不重复,并存放在数组中。下列给定程序中函数fun的功能是:删除数列中值为x的元素,变量11中存放数列中元素的个数。
使用VC++2010打开考生文件夹下prog1中的解决方案。此解决方案的项目中包含一个源程序文件prog1.c。在此程序中,请编函数fun,其功能是将一个数字字符串转换成与其面值相同的长整型整数。可调用strlen函数求字符串的长度。例如:在键盘输入字符串
设二叉树的后序序列为DGHEBIJFCA,中序序列为DBGEHACIFJ。则前序序列为
C语言主要是借助以下哪种手段来实现程序模块化
随机试题
专门的音乐教育活动
下列哪一项不符合室间隔缺损的特点
中心静脉压正常变动范围是
对考核不合格的医师,县级以上人民政府卫生行政部门可以
以下不属于对计算期不同的互斥方案进行比选的方法的是()。
当前鼓励和促进中小企业发展的重点是解决中小企业融资难问题,国家将进一步完善中小企业间接融资体系。()应积极探索依托城市商业银行网络开展对中小企业的转贷款业务。
检测时与工件不接触,不仅可以探伤,而且可以揭示尺寸变化和材料特性的检测方法是()。
常言道:数子十过,莫如奖子一长。这启示我们,教育应坚持()。
下列词语中划线的字,注音全都正确的一组是()。
有两个关系R和S如下:则由关系R得到关系S的操作是
最新回复
(
0
)