首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序段的运行结果是( )。#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-05-22
16
问题
下列程序段的运行结果是( )。#include<stdio.h>void main(){ char str[]="ABC",*p=str; printf("%d\n",*(p+3));}
选项
A、67
B、0
C、字符’C’的地址
D、字符’C’
答案
2
解析
先定义了一个指向字符型数组str的指针p,指针p指向数组str的首地址,p+3将指针指向str[3],又因为字符型数组在存放字符串时会自动在末尾加上’\0’,所以*(p+3)=0。
转载请注明原文地址:https://kaotiyun.com/show/F3Wp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
设有如下程序:PrivateSubInv(ByValxStrAsString,yStrAsString)DimtStrAsStringDimLAsIntegerL=Len(x
窗体上有两个名称分别为Text1、Text2的文本框。Text1的KeyUp事件过程如下;‘PrivateSubTextlj(eyUp(KeyCodeAsInteger,ShiftAsInteger)DimcAsStringC=
窗体上有名称为List1的列表框。以下能够将列表框当前选定的列表项替换为字符串“Basic”的语句是
设a=2,b=3,c=4,d=5,下列表达式的值是a>bAndc<=dOr2*a>c
设有以下过程:PrivateSubproe(xAsInteger,OptionalYAsInteger)Printx,yEndSub针对此过程,下面正确的过程调用语句是
在下面语句或函数中,不能描述选择结构的是
窗体上有一个名称为Text1的文本框和一个名称为Command1的命令按钮,要求程序运行时,单击命令按钮(如图所示),就可以把文本框中的内容写到文件Out.txt中,每次写入的内容附加到文件原有内容之后。以下能正确实现上述功能的程序是()。
某图书集团数据库中有关系模式R(书店编号,书籍编号,库存数量,部门编号,部门负责人),其中要求(1)每个书店的每种书籍只在该书店的一个部门销售;(2)每个书店的每个部门只有一个负责人;(3)每个书店的每种书籍只有一个库存数量。
在考生文件夹下有一个工程文件st5.vbp,其窗体上有两个命令按钮、三个标签和三个文本框,均使用默认名称。程序的功能如下:①如果单击“读数据”命令按钮,则将考生文件夹下in5.dat文件中两组已按升序方式排列的数(每组30个数)分别读入数组A和B
在考生文件夹下有一个工程文件sjt5.vbp,含三个窗体,标题分别为“启动”、“注册”、“登录”,运行时显示“启动”窗体,单击其上按钮时弹出对应窗体进行注册或登录。注册信息放在全局数组users中,注册用户数(最多10个)放在全局变量n中(均已在标准模块中
随机试题
在Word2010中,要将表格增加一行,下列操作正确的是_____________。
患者,女,25岁。近3天发烧,腰痛,伴尿急、尿频、尿痛,尿镜检见每高倍视野白细胞25个。出现高血压时考虑何原因
某规模化猪场5~8周龄的保育仔猪出现发病,病猪发热、食欲减退;呼吸困难、咳嗽;关节肿胀、跛行、颤抖;共济失调、可视黏膜发绀,严重者死亡。临死前侧卧或四肢呈划水样。剖检可见多发性纤维素性或浆液性脑膜炎、胸膜炎、心肌炎、腹膜炎、关节炎、间质性肺炎、心包炎,形成
女,30岁。外阴肿物疼痛一周,加剧5小时。查:右侧前庭腺红肿,触痛(+),波动(+),应如何处理
各开户单位的库存现金限额,由开户行根据单位需要核定,一般按照单位()天日常零用开支所需来确定。
进口商应当在有关货物进口报关后一个月内向外管局办理核销报审手续。()
常用的风险识别方法有()。
《中华人民共和国合同法》中关于撤销权的规定,除________外,其他情形下,债权人都可以请求人民法院撤销债务人的行为。
去年1月份,该市进出口贸易总值为()。今年前两个月,一般贸易出口占总出口的比重比去年同期()。
Haitianstrikersarerefusing
最新回复
(
0
)