首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
阅读下面程序,程序执行后的结果为( )。 #inc1ude "stdio.h" main() {char *str="abcdefghijklmnopq"; while(*str++! =’e’); print
阅读下面程序,程序执行后的结果为( )。 #inc1ude "stdio.h" main() {char *str="abcdefghijklmnopq"; while(*str++! =’e’); print
admin
2021-04-28
22
问题
阅读下面程序,程序执行后的结果为( )。
#inc1ude "stdio.h"
main()
{char *str="abcdefghijklmnopq";
while(*str++! =’e’);
printf("%c\n",*str);
}
选项
A、f
B、a
C、e
D、q
答案
A
解析
本题考查的是取内容运算符“*”和自加运算符“++”的优先级问题。由于“++”的优先级高于“*”,所以题干中“*str++!=’e’”,即“*(str++)!=’e’”,当str指向字符“’e"’时,while循环的条件不成立,但“str”已经进行了自加指向了字符“’f’”,所以“*str”输出字符“’f’”。
转载请注明原文地址:https://kaotiyun.com/show/DHtp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
设循环队列的存储空间为Q(1:35),初始状态为front=rear=35。现经过一系列入队与退队运算后,front=15,rear=15,则循环队列中的元素个数为
以下选项中非法的C语言字符常量是
以下C语言用户标识符中,不合法的是
负责数据库中查询操作的数据库语言是()。
对如下二叉树进行后序遍历的结果为
在下列模式中,能够给出数据库物理存储结构与物理存取方法的是
设有一个M*N的矩阵已经存放在一个M行N列的数组x中,且有以下程序段sum=0;for(i=0;i
设二叉树共有500个结点,其中叶子结点有250个。则度为2的结点个数是
学生和课程的关系模式定义为:S(S#,Sn,Sd,Dc,Sa)(其属性分别为学号、姓名、所在系、所在系的系主任、年龄);C(C#,Cn,P#)(其属性分别为课程号、课程名、先选课);SC(S#,C#,G)(其属性分别学号、课程号和成绩)。关系中包含
下列关于软件工程的描述中正确的是
随机试题
境内上市外资股参照国际通行标准,实行预留股份,预留的数额不超过该次拟募集境内上市外资股数额的()
男性,58岁。午休后突感头晕,右侧肢体无力伴不能言语,既往:有冠心病、房颤史,头颅CT扫描示左侧内囊区一斑片状低密度影男性,57岁。突然出现右侧上肢麻木伴无力,说话困难。约10分钟缓解,次日再度出现同样症状,并伴有左侧眼睛视物模糊,10分钟后再次缓解。
A.Murphy(墨菲征)阳性B.麦氏点压痛C.Courvoisier(库瓦西耶征)阳性D.Courvoisicr(库瓦西耶征)阴性E.板状腹急性胆囊炎可引起的体征是()
凝血酶时间(TT)延长见于()
杜仲的主产地是牡丹皮的主产地是
施工方进度控制的经济措施包括()。
一个完整的期货交易流程应包括()。
学科取向的课程有()课程观。
事后控制不如事中控制,事中控制不如事前控制,可惜大多数事业经营者均未能________到这一点,等到错误的决策造成了重大的损失才如梦方醒,结果往往是请来了名气很大的“空降兵”,也________。填入画横线部分最恰当的一项是()。
算法的时间复杂度是指()。
最新回复
(
0
)