首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有以下程序段 struct st{int x;int*y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 以下选项中表达式的值为11的是
有以下程序段 struct st{int x;int*y;}*pt; int a[]={1,2},b[]={3,4}; struct st c[2]={10,a,20,b}; pt=c; 以下选项中表达式的值为11的是
admin
2019-08-18
19
问题
有以下程序段
struct st{int x;int*y;}*pt;
int a[]={1,2},b[]={3,4};
struct st c[2]={10,a,20,b};
pt=c;
以下选项中表达式的值为11的是
选项
A、pt->x
B、*pt->y
C、++pt->x
D、(pt++)->x
答案
C
解析
由题目的已知条件可知,pt指向结构体数组c[2]的第一元素c[0],所以pt->x=10,执行自加运算后为11。
转载请注明原文地址:https://kaotiyun.com/show/jpRp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
请编写函数fun,函数的功能是:判断字符串是否为回文?若是,函数返回1,主函数中输出:YES;否则返回0,主函数中输出NO。回文是指顺读和倒读都一样的字符串。例如,字符串LEVEL是回文,而字符串123312就不是回文。注意:部分源程序
给定程序中,函数fun的功能是将带头结点的单向链表逆置。即若原链表中从头至尾结点数据域依次为:2、4、6、8、10,逆置后,从头至尾结点数据域依次为:10、8、6、4、2。请在程序的下划线处填入正确的内容并把下划线删除,使程序得出正确的结果。
学生的记录由学号和成绩组成,N名学生的数据已在主函数中放入结构体数组s中,请编写函数fun,它的功能是:函数返回指定学号的学生数据,指定的学号在主函数中输入。若没找到指定学号,在结构体变量中给学号置空串,给成绩置-1,作为函数值返回。(用于字符串比较的函数
程序通过定义学生结构体变量,存储了学生的学号、姓名和3门课的成绩。函数fun的功能是对形参b所指结构体变量中的数据进行修改,最后在主函数中输出修改后的数据。例如:b所指变量t中的学号、姓名、和三门课的成绩依次是:10002、"ZhangQi"、9
冒泡排序在最坏情况下的比较次数是
对如下二叉树进行后序遍历的结果为
设有定义:intk=1,m=2;f=7;,则以下选项中错误的表达式是
以下叙述中正确的是
有如下程序段:intk;for(k=2;k==0;)printf("%d",k一一);则for循环体执行的次数是()。
使用VC++2010打开考生文件夹下blank1中的解决方案。此解决方案的项目中包含一个源程序文件blank1.c。函数fun的功能是将一个由字符0和1组成的表示二进制数的字符串,转换成相应的十进制整数值返回。该串长度最大不超过15。例如,若表示
随机试题
被申请人应当在接到仲裁委员会送达的仲裁申请书副本之日起_______内提交答辩书。()
患者,女,70岁。多发性关节疼痛30年。双侧腕关节肿痛、僵硬、强直、不能活动,双手手指向尺侧偏斜、关节呈梭形肿胀、活动受限。X射线片可见关节间隙狭窄、骨质破坏。最终导致该患者腕关节强直的原因是
女性,32岁,因原发性血小板减少性紫癜,需输注血小板200ml,其正确的护理措施为
技术资料是开发建设项目的重要技术管理成果,其主要内容包括:前期工作资料,土建资料。()
(2004年卷一第78题)以下关于我国专利制度的哪些说法是错误的?
握手有伸手先后的规矩,下列说法正确的是:
粟和稷实际就是人们常见的小米,当它在民间作为人们餐桌上的主食时,名字是粟;当它被呈人宫廷,作为社稷坛上祭天的成果时,名字是稷。同一种作物拥有了两种不同的名字,在这作物的分工背后,隐藏着人的分工,在历史长河的某一瞬间,小米们走上了两条路,一种是名为粟的粮食,
某程序设计语言规定在源程序中的数据都必须具有类型,然而,(28)并不是做出此规定的理由。
下列关于Windows2003系统下DHCP服务器的描述中,错误的是
Whatisthefirstwordthebabytosay?
最新回复
(
0
)