首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
以下程序运行后的输出结果是( )。 #include<stdio.h> main() { int x=20; printf("%d", 0<x<20); printf("%d\n", 0<x && x<20);
以下程序运行后的输出结果是( )。 #include<stdio.h> main() { int x=20; printf("%d", 0<x<20); printf("%d\n", 0<x && x<20);
admin
2011-06-10
21
问题
以下程序运行后的输出结果是( )。
#include<stdio.h>
main()
{ int x=20;
printf("%d", 0<x<20);
printf("%d\n", 0<x && x<20);
}
选项
答案
10
解析
表达式0<x<20,首先计算0<x,其值为1,再计算1<20,其值为1,输出1;表达式0<x && x<20,0<x为1,x<20为0,再计算1 && 0,其值为0,输出0。所以输出结果为10。
转载请注明原文地址:https://kaotiyun.com/show/k3Pp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
以下程序运行后的输出结果是【 】。main( ) { chara[]="Language",b[]="Programe"; char*p1,*p2;intk; p1=a;p2=b; for(k=0;k<=7;k++
有以下程序 intf(inta) {returna%2;} main() {ints[8]={1,3,5,2,4,6},i,d=0; for(i=0;f(s[i]);i++)d+=s[i]; print
有以下程序:#include<stdio.h>main()inti;for(i=0;i<3;i++)switch(i)case0:print
设有定义:intn1=0.n2,*p=&n2,*q=&n1;,以下赋值语句中与n2=n1;语句等价的是
若有定义"int*p[3];",则以下叙述中下确的是
以下程序的功能是:建立一个带有头结点的甲—向链表,并将存储在数组中的字符依次转存到链表的各个结点中,请从与下划线处号码对应的一组选项中选择出正确的选项。#include<stdlib.h>structnode{charda
为了使模块尽可能独立,要求
有两个C程序文件T18.c和myfun.c同在VC系统目录(文件夹)下,其中T18.c文件如下:#include<stdio.h>#include"myfun.c"main(){fun();pri
以下说法中正确的是()。
随机试题
法约尔认为,________就是注意是否一切都按已制定的规章和下达的命令进行。
下列对动作发展的规律描述不正确的选项是()
设y=6x,则dy=______.
简述员工培训与管理人员培训的方法。
乳腺炎的超声特点是:
某研究人员欲用双缩脲法检测血清总蛋白。应选择的波长为
目前钢结构或其他金属结构的防火措施主要包括()方式。
已知点P1(x0,y0)为双曲线=1(b为正常数)上任一点,F2为双曲线的右焦点,过P1作右准线的垂线,垂足为A,连接F2A并延长交y轴于点P2.求线段P1P2的中点P的轨迹E的方程;
已有研究表明,大脑的功能区并不是一成不变的。研究人员利用功能性磁共振成像技术在先天盲人执行语句理解任务时对其大脑视觉区进行扫描。如果大脑视觉皮层区拥有语言处理能力,那么在接触语言信息时,将会表现出与经典大脑语言区的相同敏感性。结果发现,大脑视觉区对句子结构
CBD
最新回复
(
0
)