首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下面程序段的运行结果是( )。 #include<stdio.h> void main() {char str[]="ABC",*p=str; pfintf("%d\n",*(p+3)); }
下面程序段的运行结果是( )。 #include<stdio.h> void main() {char str[]="ABC",*p=str; pfintf("%d\n",*(p+3)); }
admin
2013-02-23
34
问题
下面程序段的运行结果是( )。 #include<stdio.h> void main() {char str[]="ABC",*p=str; pfintf("%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://jikaoti.com/ti/ebn0FFFM
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
C语言规定,函数返回值的类型是由()
下列程序的输出结果【】。#definePR(ar)printf("ar=%d",ar)main(){intj,a[]={1,3,5,7,9,1l,13,1},*p=a+5;for(j=3;j;j--)
数据库系统在三级模式之间提供了两层映像,这两层映像是外模式/模式映像和【】。
下列程序执行后的输出结果是______。main(){chararr[2][4];atrcpy(arr,"you");strcpy(arr[1],"me");art[0][3]=’&’;printf("%s\n
以下函数的功能是计算s=1+1/21+1/3!+…+1/n!,请填空。doublefun(intn){doubles=0.0,fac=1.0;inti,k=1;for(i=1;i<=n;i++){
以下选项中,不能确定赋值的是______。
以下选项中,非法的字符常量是______。
软件危机是大型软件开发中出现的现象,下列选项中的______是其主要表现。①软件生产的复杂性。②软件生产进度无法控制。③软件生产高成本、无法控制。④软件需求定义不准确。
下列选项中,不是关于栈的基本运算的叙述是______。
当执行下面的程序时,其输出结果为______。unionst{inta;charb;}main(){unionsts;char*p=(char*)&s;
随机试题
香港特别行政区设立__________、__________、区域法院、__________和其他专门法庭。
A.饥不欲食B.消谷善饥C.食欲不振D.厌食食积肠胃之人可见
A.卵磷脂B.心磷脂C.脑磷脂D.鞘磷脂上述物质合成时不需要丝氨酸的是
悲忧过度,则可损伤
乙型脑炎病毒主要的传染源和中间宿主是
女性患者,36岁。引产1周后发热伴腹痛2天。查体:全腹软,少量阴道血性分泌物,宫颈举痛(+),子宫增大如孕3个月,宫体压痛,双附件增厚压痛,T39℃,WBC18×109/L,中性粒细胞90%。本病例的鉴别诊断有
背景某施工总承包企业承担北京某综合楼工程。建筑面积43457m2,筏板基础,框架剪力墙结构。地下二层,地上十层。2015年10月1日开工,2017年6月1日竣工。北京地区2015年、2016年冬期施工期限是11月15日至3月15日。2016年6月15日至
由于工程质量形成的影响因素多,所以对工程质量状况的调查和质量问题的分析必须分门别类地进行,以便准确有效地找出问题及其原因,这是( )的基本思想。
WhendidKantbecomeaprofessor?
Theleadershould______everysuggestionworthyofcarefulconsiderationwhichisputforwardbythemasses.,
最新回复
(
0
)