首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序段的运行结果是( )。 #include<stdio.h> void main() { char str[]="ABC",*p=str; printf("%d\n",*(p+3) ); }
下列程序段的运行结果是( )。 #include<stdio.h> void main() { char str[]="ABC",*p=str; printf("%d\n",*(p+3) ); }
admin
2010-09-05
29
问题
下列程序段的运行结果是( )。
#include<stdio.h>
void main()
{ char str[]="ABC",*p=str;
printf("%d\n",*(p+3) );
}
选项
A、67
B、0
C、字符’C’的地址
D、字符’C’
答案
B
解析
先定义了一个指向字符型数组str的指针p,指针p指向数组str的首地址,p+3将指针指向str[3],又因为字符型数组在存放字符串时会自动在末尾加上’\0’,所以*(p+3)=0。
转载请注明原文地址:https://kaotiyun.com/show/iaWp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
窗体上有一个名称为Text1的文本框,一个名称为CD1的通用对话框,一个标题为“打开文件”的命令按钮,如图所示。命令按钮的单击事件过程如下:PrivateSubCommand1_Click()CD1.ShowOpenOpen
一个栈的初始状态为空。现将元素1,2,3,A,B,C依次入栈,然后再依次出栈,则元素出栈的顺序是
窗体上有一个名称为Command1的命令按钮,其单击事件过程如下:PrivateSubCommand1_Click()DimxAsInteger,yAsIntegerStaticzAsIntegerx
窗体上有两个名称分别为Text1、Text2的文本框。Text1的KeyUp事件过程如下:PrivateSubText1_KeyUp(KeyCodeAsInteger,ShiftAsInteger) DimcAsString
以下描述中,不是线性表顺序存储结构特征的是()。
结构化程序设计中,下面对goto语句使用描述正确的是
在关系数据库中,用来表示实体间联系的是
算法的有穷性是指( )。
设有关键码序列(66,13,51,76,81,26,57,69,23),要按关键码值递增的次序排序,若采用快速排序法,并以第一个元素为划分的基准,那么第一趟划分后的结果为()。
随机试题
膝关节内的内侧半月板较大,呈_______________形,其外缘与_______________和_______________紧密相连;外侧半月板较小,呈_______________形,其外缘与关节囊相愈着,但关节囊与腓侧副韧带之间有_______
原始凭证按照格式的不同,可分为()。
属于精神分析治疗常用的是
回复上级机关的询问,使用()。
2019年7月17日,国家互联网应急中心发布的《2018年中国互联网网络安全报告》显示,()成为发生网络攻击的重灾区,云服务商和云用户应加大对网络安全的重视和投入,分工协作提升网络安全防范能力。
对于领导做出的命令或决定,你觉得有问题,并认为自己的方案更好,向领导提出建议后,领导依然要求按照他的决定执行,请问你怎么办?
2009年7月8日~10日,()首脑会议在意大利拉奎拉举行。其间还同中国、巴西、印度、墨西哥和南非等发展中五国以及埃及举行领导人对话会,并首次发表共同宣言,承诺携手应对全球性挑战,决定将旨在建立伙伴关系的“海利根达姆进程”延续2年并更名为“海
Animalshavebeenkeptaspetsbypeopleinallpartsoftheworldforthousandsofyears.Themost【C1】______petsaredogs,cats
Therearemoredrugsdispensedforpainthanforanyotherdiseaseonthisplanet.Drugcompaniesenjoyearninghugeprofitsf
A、Hewillwritealettertoanothercompany.B、Hehasreceivedmanyjoboffers.C、Hehasn’tacceptedthejoboffer.D、Hewillle
最新回复
(
0
)