首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面程序的输出结果是( )。 #include<stdio.h> main() {int a[]={1,2,3,4,5,6,7,8,7,10},*p; p=a; printf("%d\n",*p+8); }
下面程序的输出结果是( )。 #include<stdio.h> main() {int a[]={1,2,3,4,5,6,7,8,7,10},*p; p=a; printf("%d\n",*p+8); }
admin
2011-06-10
6
问题
下面程序的输出结果是( )。 #include<stdio.h> main() {int a[]={1,2,3,4,5,6,7,8,7,10},*p; p=a; printf("%d\n",*p+8); }
选项
A、0
B、1
C、10
D、9
答案
D
解析
“*”号的优先级比“+”的优先级高,所以先执行“*P”:指针P指向的是数组的首地址,因此*p=1;再加8得9。
转载请注明原文地址:https://kaotiyun.com/show/YxPp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
设有以下定义 stuctss { intinfo;structss*link;}x,y,z; 且已建立如下图所示链表结构: 请写出删除结点y的赋值语句【】。
以下程序中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是
若有一些定义和语句 #include <stdio.h> int a=4,b=3,*p,*q,*w; p=&a; q=&b; w=q; q=NULL; 则以下选项中错误的语句是
已定义c为字符型变量,则下列语句中正确的是
有以下程序 main( ) { inta;charc=10; floatf=100.0;doublex; a=f/=c*=(x=6.5); printf("%d%d%3.1f%3.1f\n",a,c,f
结构化程序由三种基本结构组成,三种基本结构组成的算法
有定义chara,b;若想通过&运算符保留a对应的二进制数的第3位和第6位的值,其余位置0,则b的二进制数应是【】。
线性表L=(a1,a2,a3,…,ai,…,an),下列说法正确的是()。
下面的程序可对指定字符串进行从大到小排序,请将程序填完整。(注:程序采用了冒泡排序算法)#include<stdio.h>#include<string.h>main(){char*str="ABCDabcd",te
检查软件产品是否符合需求定义的过程称为()。
随机试题
通用的标准诊断测试连接器(DLC)的标准安装位置在_________侧仪表板下面。
解释下列加着重号的词。子路曰:“願車馬衣輕裘與朋友共,敝之而無憾。”
与全口义齿固位关系最密切的因素是
根据已确定的流动式起重机的幅度、臂长,查特性曲线,确定其()。
所谓技术创新,是指对新产品、新过程的商业化以及对新组织结构等进行搜寻、发现、改善和采用的一系列活动的总称。某种观点认为,完全竞争的市场结构不利于促进技术创新。这种观点的主要依据是()。
小说:诗歌:文学相当于()。
上级人民法院()下级人民法院的审判工作。
下列程序执行后的输出结果是_______。main(){intm[][3]={1,4,7,2,5,8,3,6,9};inti,k=2;for(i=0;i<3;i++){printf("%d"
以下正确的电子邮箱地址的格式是
ThetravelersaregoingtoTaiwan,______theyplantostayfortwoorthreedays.
最新回复
(
0
)